public static ImageIcon getIcon(String file) { ImageIcon sysIcon = FileUtils.getSystemImageIcon(iconTheme + "/" + file); if (sysIcon == null) { logger.severe("Icon " + file + " not found."); } return sysIcon; }
/** * loads default colours for the types from the system's type file. This is used when Triana is * first run. */ public static void loadDefaultColours() { Vector<String> types = Env.getTrianaTypesAndDefaultColors(); for (int i = 0; i < types.size(); ++i) { Color c; Vector<String> sv = FileUtils.splitLine(types.get(i)); if (sv.size() == 4) // they have a colour { c = new Color( Integer.parseInt(sv.get(1)), Integer.parseInt(sv.get(2)), Integer.parseInt(sv.get(3))); } else { c = new Color(0, 0, 0); } // set to black if no colour is set if (sv.size() != 0) { cableColours.put(sv.get(0), c); } } }
public static Image getImage(String file) { return FileUtils.getSystemImage(file); }