|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.util.IconHelper
public final class IconHelper
IconHelper acts as an interface to the all icons currently in classpath. IconHelper is a singleton class that maintains internal cache to all accessed icons. This class may be used to minimize the memory consumption where application uses static icons. If icons are changed independently, this class should not be used.
Field Summary | |
---|---|
static java.lang.String |
ICONS_GENERAL_DELETE16
|
static java.lang.String |
ICONS_GENERAL_DELETE24
|
static java.lang.String |
ICONS_GENERAL_REMOVE16
|
static java.lang.String |
ICONS_GENERAL_REMOVE24
|
static java.lang.String |
ICONS_NAVIGATION_DOWN16
|
static java.lang.String |
ICONS_NAVIGATION_DOWN24
|
static java.lang.String |
ICONS_NAVIGATION_MINUS16
|
static java.lang.String |
ICONS_NAVIGATION_PLUS16
|
static java.lang.String |
ICONS_NAVIGATION_UP16
|
static java.lang.String |
ICONS_NAVIGATION_UP24
|
Method Summary | |
---|---|
static javax.swing.Icon |
createIcon(java.io.File file)
Creates an Icon by reading the image stored in the given file. |
static javax.swing.Icon |
createIcon(java.lang.String name)
Returns instance of the icon. |
static javax.swing.Icon |
createIcon(java.lang.String name,
java.lang.ClassLoader cl)
Returns instance of the icon by loading it using the
ClassLoader instance provided. |
static java.awt.Image |
createImage(java.lang.String name)
Creates a new image loaded from the provided image file name. |
static java.awt.Image |
createImage(java.lang.String name,
java.lang.ClassLoader cl)
Creates a new image loaded from the provided image file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String ICONS_NAVIGATION_DOWN16
public static java.lang.String ICONS_NAVIGATION_DOWN24
public static java.lang.String ICONS_NAVIGATION_MINUS16
public static java.lang.String ICONS_NAVIGATION_PLUS16
public static java.lang.String ICONS_NAVIGATION_UP16
public static java.lang.String ICONS_NAVIGATION_UP24
public static java.lang.String ICONS_GENERAL_DELETE16
public static java.lang.String ICONS_GENERAL_DELETE24
public static java.lang.String ICONS_GENERAL_REMOVE16
public static java.lang.String ICONS_GENERAL_REMOVE24
Method Detail |
---|
public static javax.swing.Icon createIcon(java.lang.String name, java.lang.ClassLoader cl)
ClassLoader
instance provided. Icons are cached. If an icon with
the same name is requested several times, createIcon
will
return the same instance each time. If icons will be manipulated
individually, do not use this method to load icons. If icon is not found
in the classpath, return value will be null.
name
- Stringcl
- ClassLoader Instance of class loader to use
public static javax.swing.Icon createIcon(java.lang.String name)
createIcon
will return the
same instance each time. If icons will be manipulated individually, do
not use this method to load icons. If icon is not found in the classpath,
or the file with that name does not exist on the disk return value will be null.
name
- String
public static java.awt.Image createImage(java.lang.String name)
name
- the filename of the image
public static java.awt.Image createImage(java.lang.String name, java.lang.ClassLoader cl)
name
- the filename of the imagecl
- classloader to be used for accessing resources
public static javax.swing.Icon createIcon(java.io.File file)
file
- the image file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |