|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.util.ImageHelper
public class ImageHelper
ImageHelper acts as an interface to the all images currently in classpath. ImageHelper is a singleton class that maintains internal cache to all accessed images. This class may be used to minimize the memory consumption where application uses static images. If images are changed independently, this class should not be used.
Method Summary | |
---|---|
static java.awt.Image |
createImage(java.lang.String name)
Returns instance of the image. |
static java.awt.Image |
createimage(java.lang.String name,
java.lang.ClassLoader cl)
Returns instance of the image by loading it using the
ClassLoader instance provided. |
static java.awt.Image |
loadResource(java.lang.String resourceName,
java.lang.ClassLoader c)
This is a utility method to help in loading image images. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.awt.Image createimage(java.lang.String name, java.lang.ClassLoader cl)
ClassLoader
instance provided. images are cached. If an image with
the same name is requested several times, createImage
will
return the same instance each time. If images will be manipulated
individually, do not use this method to load images. If image is not found
in the classpath, return value will be null.
name
- Stringcl
- ClassLoader Instance of class loader to use
public static java.awt.Image createImage(java.lang.String name)
createImage
will return the
same instance each time. If images will be manipulated individually, do
not use this method to load images. If image is not found in the classpath,
return value will be null.
name
- String
public static java.awt.Image loadResource(java.lang.String resourceName, java.lang.ClassLoader c)
resourceName
- A pathname relative to the directory
holding the class loader specified. For example,
"wombat.gif".c
- ClassLoader.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |