Documentation of 'CH.ifa.draw.util.Iconkit' Java class
Iconkit
CH.ifa.draw.util

Class Iconkit



  • public class Iconkit
    extends java.lang.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 Summary

      Constructors 
      Constructor and Description
      Iconkit(java.awt.Component component)
      Constructs an Iconkit that uses the given editor to resolve image path names.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.awt.Image getImage(java.lang.String filename)
      Gets the image with the given name.
      static Iconkit instance()
      Gets the single instance
      java.awt.Image loadImage(java.lang.String filename)
      Loads an image with the given name.
      java.awt.Image loadImageResource(java.lang.String resourcename) 
      void loadRegisteredImages(java.awt.Component component)
      Loads all registered images.
      java.awt.Image registerAndLoadImage(java.awt.Component component, java.lang.String fileName)
      Registers and loads an image.
      void registerImage(java.lang.String fileName)
      Registers an image that is then loaded together with the other registered images by loadRegisteredImages.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Iconkit

        public Iconkit(java.awt.Component component)
        Constructs an Iconkit that uses the given editor to resolve image path names.
    • Method Detail

      • instance

        public static Iconkit instance()
        Gets the single instance
      • loadRegisteredImages

        public void loadRegisteredImages(java.awt.Component component)
        Loads all registered images.
        See Also:
        registerImage(java.lang.String)
      • registerImage

        public void registerImage(java.lang.String fileName)
        Registers an image that is then loaded together with the other registered images by loadRegisteredImages.
        See Also:
        loadRegisteredImages(java.awt.Component)
      • registerAndLoadImage

        public java.awt.Image registerAndLoadImage(java.awt.Component component,
                                                   java.lang.String fileName)
        Registers and loads an image.
      • loadImage

        public java.awt.Image loadImage(java.lang.String filename)
        Loads an image with the given name.
      • loadImageResource

        public java.awt.Image loadImageResource(java.lang.String resourcename)
      • getImage

        public java.awt.Image getImage(java.lang.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.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.