1 29 30 package hero.client.grapheditor; 31 32 33 import java.awt.Image ; 34 import java.awt.Toolkit ; 35 import java.net.URL ; 36 37 public class IconManager { 38 39 public static Image getIcon(String name) { 40 URL iconUrl = Thread.currentThread().getContextClassLoader().getResource(Frame.imageBase + name); 41 return Toolkit.getDefaultToolkit().getImage(iconUrl); 42 } 43 44 public static URL getIconUrl(String name) { 45 return Thread.currentThread().getContextClassLoader().getResource(Frame.imageBase + name); 46 } 47 48 public static String [] listAvailablesIcons() { 49 return new String [] { 50 "publiee-icon.png", 51 "classic-icon.png", 52 "waiting-icon.png", 53 "locked-red-icon.png", 54 "locked-yellow-icon.png", 55 "creation-icon.png", 56 "ok-icon.png", 57 "archived-icon.png" }; 58 } 59 60 public static String getDefaultIcon() { 61 return "classic-icon.png"; 62 } 63 64 } 65 | Popular Tags |