edu.stanford.hci.dtools.utility
Class ImageCache
java.lang.Object
edu.stanford.hci.dtools.utility.ImageCache
public class ImageCache
- extends java.lang.Object
Cache for image files. Images should be retrieved from this, rather than from the file system themselves.
Speeds up program execution significantly.
This software is distributed under the
BSD License.
- Author:
- Bjoern Hartmann ( bjoern(AT)stanford.edu )
Method Summary |
org.eclipse.swt.graphics.Image |
get(java.lang.String filename,
int width,
int height)
|
org.eclipse.swt.graphics.Rectangle |
getOriginalSize(java.lang.String filename)
|
void |
put(java.lang.String filename,
int width,
int height,
org.eclipse.swt.graphics.Image img)
Explicitly add a new image to the map |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageCache
public ImageCache()
getOriginalSize
public org.eclipse.swt.graphics.Rectangle getOriginalSize(java.lang.String filename)
get
public org.eclipse.swt.graphics.Image get(java.lang.String filename,
int width,
int height)
put
public void put(java.lang.String filename,
int width,
int height,
org.eclipse.swt.graphics.Image img)
- Explicitly add a new image to the map