|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.util.ResourceCache
com.threerings.opengl.util.ImageCache
public class ImageCache
A cache for images.
| Nested Class Summary | |
|---|---|
protected static class |
ImageCache.ImageKey
Identifies a cached image. |
| Nested classes/interfaces inherited from class com.threerings.opengl.util.ResourceCache |
|---|
ResourceCache.CachedResource<T>, ResourceCache.Subcache<K,V> |
| Field Summary | |
|---|---|
protected ResourceCache.Subcache<ImageCache.ImageKey,BufferedImage> |
_buffered
The buffered image subcache. |
protected ResourceCache.Subcache<ImageCache.ImageKey,Image> |
_images
The GUI image subcache. |
| Fields inherited from class com.threerings.opengl.util.ResourceCache |
|---|
_checkTimestamps, _ctx |
| Constructor Summary | |
|---|---|
ImageCache(GlContext ctx,
boolean checkTimestamps)
Creates a new image cache. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the cache, forcing resources to be reloaded. |
BufferedImage |
getBufferedImage(String path,
Colorization... zations)
Retrieves a buffered image from the cache. |
Image |
getImage(String path,
Colorization... zations)
Retrieves a GUI image from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ResourceCache.Subcache<ImageCache.ImageKey,Image> _images
protected ResourceCache.Subcache<ImageCache.ImageKey,BufferedImage> _buffered
| Constructor Detail |
|---|
public ImageCache(GlContext ctx,
boolean checkTimestamps)
checkTimestamps - if true, check the last-modified timestamp of each resource file
when we retrieve it from the cache, reloading the resource if the file has been modified
externally.| Method Detail |
|---|
public Image getImage(String path,
Colorization... zations)
public BufferedImage getBufferedImage(String path,
Colorization... zations)
public void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||