net.simplace.ui.ImageProvider

Resource manager for images. It has the ability to load a predefined set of icons at initialization time and keep them in memory. The set of images to be loaded is defined in the file 'images.properties' which must be located somewhere in the class path. it is also possible to locate localized images. use localization as follows: main.flag=frde.gif - default if non of the given local images are found main.flag.de_DE=de.gif - german image main.flag.fr_FR=fr.gif - french image main.flag.en_US=en.gif - english image


public final class ImageProvider {

// Constants
public static final BufferedImage DEFAULT_EMPTY;

// Class Methods
public static ImageProvider getInstance();

Get Singleton instance of ImageResourceManager.
public static final BufferedImage getImageFromPanel(JPanel aJPanel);


// Public Instance Methods
public boolean hasImage(String aKey);

Returns if the given icon is in this manager.
public boolean hasLocalizedImage(String aKey);

Returns if the given image is accessable in this manager.
public URL getImageURL(String aKey);

Returns the url for the given icon.
public ImageIcon getImage(String aKey, ImageIcon aDefault);

Get ImageIcon specified by the name supplied as an argument to this method.
public BufferedImage getBufferedImage(String aKey, BufferedImage aDefault);

Get ImageIcon specified by the name supplied as an argument to this method.
public ImageIcon getImage(String aKey);

Get ImageIcon specified by the name supplied as an argument to this method.
public BufferedImage getBufferedImage(String aKey);

Get ImageIcon specified by the name supplied as an argument to this method.
public ImageIcon getLocalizedImage(String aKey, ImageIcon aDefault);

Get ImageIcon specified by the name supplied as an argument to this method.
public BufferedImage getLocalizedBufferedImage(String aKey, BufferedImage
aDefault);

Get ImageIcon specified by the name supplied as an argument to this method.
public ImageIcon getLocalizedImage(String aKey);

Get ImageIcon specified by the name supplied as an argument to this method.
public void setInterceptedIcon(String aKey, String aURL);

Get ImageIcon specified by the name supplied as an argument to this method. Looks on the server if the image is available.
public String resolveResourceTags(String aHTMLCode);

Parses content for embedded resources, and inserts additional information for resource location found in classpath.
public ImageIcon getImageFromRessource(String aImageName);


returns s Image for given Name. Image is searched in Classpath.


}



Returned by: getInstance()