public class ImageCache extends Object
Constructor and Description |
---|
ImageCache()
New empty image cache.
|
Modifier and Type | Method and Description |
---|---|
static ImageCache |
defaultImageCache()
Default singleton image cache instance that can be shared.
|
Image |
getDummyImage()
A dummy 16x16 image.
|
Image |
getImage(String fileNameOrUrl)
Lookup an image based on its name, if found return it, else try to load
it.
|
Image |
getImage(String fileNameOrUrl,
boolean forceTryReload)
The same as
getImage(String) but you can force the cache to try
to reload an image that where not found before. |
public static ImageCache defaultImageCache()
public Image getImage(String fileNameOrUrl)
fileNameOrUrl
- A file name or an URL pointing at the image.public Image getImage(String fileNameOrUrl, boolean forceTryReload)
getImage(String)
but you can force the cache to try
to reload an image that where not found before.fileNameOrUrl
- A file name or an URL pointing at the image.forceTryReload
- If true, try to reload an image that where not found before.public Image getDummyImage()
Copyright © 2015. All rights reserved.