Package jaxe
Class ImageKeeper
java.lang.Object
jaxe.ImageKeeper
Image loader and cache
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprotected ImageLoads an image from a class or returns a cached image from the mapprotected ImageLoads an imagestatic ImageLoads an image from a specific classstatic ImageLoads an image from a specific classstatic ImageLoads an imagestatic ImageLoads an imageprotected voidRemoves an image from the mapstatic voidremoveImage(String file) Removes an image out of the cache
-
Field Details
-
_images
Map with images
-
-
Method Details
-
loadImage
Loads an image- Parameters:
file- Path/filename- Returns:
- Image or
null
-
loadImage
Loads an image- Parameters:
file- Path/filename- Returns:
- Image or
null
-
loadImage
Loads an image from a specific class- Parameters:
point- Class to load fromfile- Path/filename- Returns:
- Image or
null
-
loadImage
Loads an image from a specific class- Parameters:
point- Class to load fromfile- Path/filename- Returns:
- Image or
null
-
removeImage
Removes an image out of the cache- Parameters:
file- Path/filename
-
flushImages
public static void flushImages() -
load
Loads an image- Parameters:
file- Path/filenamenotNull- Flag to return a dummy image if image could not be loaded- Returns:
- Image or
null
-
load
Loads an image from a class or returns a cached image from the map- Parameters:
point- Point to load fromfile- Path/filenamenotNull- Flag to return a dummy image if image could not be loaded- Returns:
- Image or
null
-
remove
Removes an image from the map- Parameters:
file- Pfad/Dateiname
-