All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.util.Iconkit
java.lang.Object
|
+----CH.ifa.draw.util.Iconkit
- public class Iconkit
- extends Object
The Iconkit class supports the sharing of images. It maintains
a map of image names and their corresponding images.
Iconkit also supports to load a collection of images in
synchronized way.
The resolution of a path name to an image is delegated to the DrawingEditor.
Design Patterns
Singleton
The Iconkit is a singleton.
-
Iconkit(Component)
- Constructs an Iconkit that uses the given editor to
resolve image path names.
-
getImage(String)
- Gets the image with the given name.
-
instance()
- Gets the single instance
-
loadImage(String)
- Loads an image with the given name.
-
loadImageResource(String)
-
-
loadRegisteredImages(Component)
- Loads all registered images.
-
registerAndLoadImage(Component, String)
- Registers and loads an image.
-
registerImage(String)
- Registers an image that is then loaded together with
the other registered images by loadRegisteredImages.
Iconkit
public Iconkit(Component component)
- Constructs an Iconkit that uses the given editor to
resolve image path names.
instance
public static Iconkit instance()
- Gets the single instance
loadRegisteredImages
public void loadRegisteredImages(Component component)
- Loads all registered images.
- See Also:
- registerImage
registerImage
public void registerImage(String fileName)
- Registers an image that is then loaded together with
the other registered images by loadRegisteredImages.
- See Also:
- loadRegisteredImages
registerAndLoadImage
public Image registerAndLoadImage(Component component,
String fileName)
- Registers and loads an image.
loadImage
public Image loadImage(String filename)
- Loads an image with the given name.
loadImageResource
public Image loadImageResource(String resourcename)
getImage
public Image getImage(String filename)
- Gets the image with the given name. If the image
can't be found it tries it again after loading
all the registered images.
All Packages Class Hierarchy This Package Previous Next Index