public class ImageKeeper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.awt.Image> |
_images
Map with images
|
Modifier and Type | Method and Description |
---|---|
static void |
flushImages() |
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
|
protected java.util.Map<java.lang.String,java.awt.Image> _images
public static java.awt.Image loadImage(java.lang.String file)
file
- Path/filenamenull
public static java.awt.Image loadImage(java.lang.String file, boolean notNull)
file
- Path/filenamenull
public static java.awt.Image loadImage(java.lang.Class point, java.lang.String file)
point
- Class to load fromfile
- Path/filenamenull
public static java.awt.Image loadImage(java.lang.Class point, java.lang.String file, boolean notNull)
point
- Class to load fromfile
- Path/filenamenull
public static void removeImage(java.lang.String file)
file
- Path/filenamepublic static void flushImages()
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 loadednull
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 loadednull
protected void remove(java.lang.String file)
file
- Pfad/Dateiname