|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccs.cpc.ImageManager
public class ImageManager
ImageManager manages loading and caching images, and notifies interested ImageHolders when their image is ready.
Constructor Summary | |
---|---|
ImageManager()
Create an ImageManager. |
Method Summary | |
---|---|
void |
addImageHolder(ImageHolder ih)
Add an ImageHolder. |
void |
flush(VFile vf)
Flush the specified image and remove it from the cache, if present. |
void |
flushAll()
Empty the cache completely. |
CpcImage |
getImage(VFile vf)
Return the image contained in the specified file, iff available. |
void |
imageLoaded(VFile job,
CpcImage result)
Notification from the ImageLoader that it's loaded an image. |
void |
loadImage(VFile job)
Request that an image be loaded. |
void |
removeImageHolder(ImageHolder ih)
Remove an ImageHolder. |
void |
setCacheLimit(java.awt.Component frame,
int n)
Set the cache size to n bytes. 8 MB is the default, and is generally a reasonable setting. |
void |
setImageLoader(ImageLoader iload)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageManager()
setImageLoader
before using.
Method Detail |
---|
public void setImageLoader(ImageLoader iload)
public void addImageHolder(ImageHolder ih)
public void removeImageHolder(ImageHolder ih)
public CpcImage getImage(VFile vf)
public void flush(VFile vf)
public void flushAll()
public void loadImage(VFile job)
imageLoaded
will be called asynchronously.
job
- The image to load.public void imageLoaded(VFile job, CpcImage result)
public void setCacheLimit(java.awt.Component frame, int n)
frame
- If the cache is too big relative to the max heap size,
it will be capped. The notification dialog hangs off this frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |