net.sf.gridarta.utils
public class GUIUtils extends Object
CGUtils
is a collection of GUI utility methods. Mainly focusing
on resource management.Modifier and Type | Field and Description |
---|---|
private Map<String,ImageIcon> |
imageCache
Caches image icons.
|
private static org.apache.log4j.Category |
log
The Logger for printing log messages.
|
Constructor and Description |
---|
GUIUtils() |
Modifier and Type | Method and Description |
---|---|
void |
addToCache(String name,
ImageIcon imageIcon)
Add an image to the cache.
|
ImageIcon |
getResourceIcon(String iconName)
Returns the image icon for the given icon name.
|
private static final org.apache.log4j.Category log
@NotNull private final Map<String,ImageIcon> imageCache
public GUIUtils()
@NotNull public ImageIcon getResourceIcon(@NotNull String iconName) throws MissingResourceException
iconName
- the icon nameMissingResourceException
- if the icon cannot be loadedpublic void addToCache(@NotNull String name, @NotNull ImageIcon imageIcon)
name
- the nameimageIcon
- the image iconFeedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.