Package net.simplace.ui
Class ImageProvider
java.lang.Object
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
- Author:
- Andreas Enders
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBufferedImage
(String aKey) Get ImageIcon specified by the name supplied as an argument to this method.getBufferedImage
(String aKey, BufferedImage aDefault) Get ImageIcon specified by the name supplied as an argument to this method.Get ImageIcon specified by the name supplied as an argument to this method.Get ImageIcon specified by the name supplied as an argument to this method.static final BufferedImage
getImageFromPanel
(JPanel aJPanel) getImageFromRessource
(String aImageName) getImageURL
(String aKey) Returns the url for the given icon.static ImageProvider
Get Singleton instance of ImageResourceManager.getLocalizedBufferedImage
(String aKey, BufferedImage aDefault) Get ImageIcon specified by the name supplied as an argument to this method.getLocalizedImage
(String aKey) Get ImageIcon specified by the name supplied as an argument to this method.getLocalizedImage
(String aKey, ImageIcon aDefault) Get ImageIcon specified by the name supplied as an argument to this method.boolean
Returns if the given icon is in this manager.boolean
hasLocalizedImage
(String aKey) Returns if the given image is accessable in this manager.resolveResourceTags
(String aHTMLCode) Parses content for embedded resources, and inserts additional information for resource location found in classpath.void
setInterceptedIcon
(String aKey, String aURL) Get ImageIcon specified by the name supplied as an argument to this method.
-
Field Details
-
DEFAULT_EMPTY
Default Empty Icon for ImageProvider
-
-
Method Details
-
getInstance
Get Singleton instance of ImageResourceManager. -
hasImage
Returns if the given icon is in this manager. -
hasLocalizedImage
Returns if the given image is accessable in this manager. -
getImageURL
Returns the url for the given icon. -
getImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getBufferedImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getBufferedImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getLocalizedImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getLocalizedBufferedImage
Get ImageIcon specified by the name supplied as an argument to this method. -
getLocalizedImage
Get ImageIcon specified by the name supplied as an argument to this method.- Returns:
- the image icon
-
setInterceptedIcon
Get ImageIcon specified by the name supplied as an argument to this method. Looks on the server if the image is available. -
resolveResourceTags
Parses content for embedded resources, and inserts additional information for resource location found in classpath. -
getImageFromPanel
-
getImageFromRessource
- Parameters:
aImageName
-- Returns:
- s Image for given Name. Image is searched in Classpath.
-