de.htwdd.rosenkoenig.util
Class ImageList
java.lang.Object
de.htwdd.rosenkoenig.util.ImageList
public class ImageList
- extends java.lang.Object
This class provides a container for images, images are accessed by symbolic
names.
It makes use of the singleton-pattern.
|
Field Summary |
private java.util.Hashtable<java.lang.String,java.awt.Image> |
images
|
private static ImageList |
instance
|
private org.apache.log4j.Logger |
log
|
|
Method Summary |
void |
addImages(java.lang.String filename,
java.awt.Component component)
adds all images specified in a property file to the list |
java.awt.Image |
getImage(java.lang.String identifier)
get an Image contained in the ImageList |
static ImageList |
getInstance()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
private static ImageList instance
images
private java.util.Hashtable<java.lang.String,java.awt.Image> images
log
private org.apache.log4j.Logger log
ImageList
private ImageList()
getInstance
public static ImageList getInstance()
- Returns:
- the instance of the singleton ImageList
getImage
public java.awt.Image getImage(java.lang.String identifier)
- get an Image contained in the ImageList
- Parameters:
identifier - smbolic name of the image
- Returns:
- image that belongs to identifier
addImages
public void addImages(java.lang.String filename,
java.awt.Component component)
- adds all images specified in a property file to the list
- Parameters:
filename - the property file that holds image paths and identifierscomponent - the component on which the images will eventually be
drawn