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

 o Singleton
The Iconkit is a singleton.



Constructor Index

 o Iconkit(Component)
Constructs an Iconkit that uses the given editor to resolve image path names.

Method Index

 o getImage(String)
Gets the image with the given name.
 o instance()
Gets the single instance
 o loadImage(String)
Loads an image with the given name.
 o loadImageResource(String)
 o loadRegisteredImages(Component)
Loads all registered images.
 o registerAndLoadImage(Component, String)
Registers and loads an image.
 o registerImage(String)
Registers an image that is then loaded together with the other registered images by loadRegisteredImages.

Constructors

 o Iconkit
 public Iconkit(Component component)
Constructs an Iconkit that uses the given editor to resolve image path names.

Methods

 o instance
 public static Iconkit instance()
Gets the single instance

 o loadRegisteredImages
 public void loadRegisteredImages(Component component)
Loads all registered images.

See Also:
registerImage
 o registerImage
 public void registerImage(String fileName)
Registers an image that is then loaded together with the other registered images by loadRegisteredImages.

See Also:
loadRegisteredImages
 o registerAndLoadImage
 public Image registerAndLoadImage(Component component,
                                   String fileName)
Registers and loads an image.

 o loadImage
 public Image loadImage(String filename)
Loads an image with the given name.

 o loadImageResource
 public Image loadImageResource(String resourcename)
 o 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