|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxe.ImageKeeper
public class ImageKeeper
Image loader and cache
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.awt.Image> |
_images
Map with images |
private static ImageKeeper |
_instance
Instance of the ImageKeeper |
private static java.awt.image.BufferedImage |
DUMMY_IMAGE
|
private static org.apache.log4j.Logger |
LOG
Logger |
| Constructor Summary | |
|---|---|
private |
ImageKeeper()
Internal constructor |
| Method Summary | |
|---|---|
private static ImageKeeper |
getInstance()
Creates an instance |
protected java.awt.Image |
load(java.lang.Class point,
java.lang.String file,
boolean notNull)
Loads an image from a class or returns a cached image from the map |
protected java.awt.Image |
load(java.lang.String file,
boolean notNull)
Loads an image |
static java.awt.Image |
loadImage(java.lang.Class point,
java.lang.String file)
Loads an image from a specific class |
static java.awt.Image |
loadImage(java.lang.Class point,
java.lang.String file,
boolean notNull)
Loads an image from a specific class |
static java.awt.Image |
loadImage(java.lang.String file)
Loads an image |
static java.awt.Image |
loadImage(java.lang.String file,
boolean notNull)
Loads an image |
protected void |
remove(java.lang.String file)
Removes an image from the map |
static void |
removeImage(java.lang.String file)
Removes an image out of the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,java.awt.Image> _images
private static final java.awt.image.BufferedImage DUMMY_IMAGE
private static final org.apache.log4j.Logger LOG
private static ImageKeeper _instance
| Constructor Detail |
|---|
private ImageKeeper()
| Method Detail |
|---|
private static ImageKeeper getInstance()
public static java.awt.Image loadImage(java.lang.String file)
file - Path/filename
null
public static java.awt.Image loadImage(java.lang.String file,
boolean notNull)
file - Path/filename
null
public static java.awt.Image loadImage(java.lang.Class point,
java.lang.String file)
point - Class to load fromfile - Path/filename
null
public static java.awt.Image loadImage(java.lang.Class point,
java.lang.String file,
boolean notNull)
point - Class to load fromfile - Path/filename
nullpublic static void removeImage(java.lang.String file)
file - Path/filename
protected java.awt.Image load(java.lang.String file,
boolean notNull)
file - Path/filenamenotNull - Flag to return a dummy image if image could not be loaded
null
protected java.awt.Image load(java.lang.Class point,
java.lang.String file,
boolean notNull)
point - Point to load fromfile - Path/filenamenotNull - Flag to return a dummy image if image could not be loaded
nullprotected void remove(java.lang.String file)
file - Pfad/Dateiname
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||