|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIconFactory
public final class IconFactory
A factory for Icon
. This class caches some of the created icons. This factory should be
used only for small icons, since they may be cached for the JVM lifetime. This class is used
especially for Java look and
feel Graphics Repository. This class is thread safe.
Field Summary | |
---|---|
static IconFactory |
DEFAULT
The default factory instance. |
Method Summary | |
---|---|
JButton |
getButton(String path,
String description,
String fallback)
Returns a button with the specified image. |
Icon |
getIcon(String path)
Returns the icon for the specified name, or null if none. |
Icon |
getIcon(String path,
String description)
Returns an icon for the specified name and description, or null if none. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IconFactory DEFAULT
Method Detail |
---|
public Icon getIcon(String path)
null
if none. If this method has
already been invoked for the specified path, then the previously created icon is returned.
path
- The icon path, relative to the application classpath.
null
if no image was found for the specified path.public Icon getIcon(String path, String description)
null
if none.
path
- The icon path, relative to the application classpath.description
- brief textual description of the image, or null
if none.
null
if no image was found for the specified path.public JButton getButton(String path, String description, String fallback)
path
- The icon path, relative to the application classpath.description
- brief textual description of the image, or null
if none.fallback
- A text to put in the button if the image were not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |