|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jsh3modtool.gui.imagetable.cache.ImageCache
public class ImageCache
A very simple image cache stuff.
Constructor Summary | |
---|---|
ImageCache(ImageLoadingListener listener)
Creates a new instance of ImageBrowserCache |
|
ImageCache(ImageLoadingListener listener,
int cacheMax)
Creates a new instance of ImageBrowserCache |
Method Summary | |
---|---|
void |
clear()
Clears the cache. |
int |
getCachedImagesCount()
Returns the number of cached images. |
java.awt.image.BufferedImage |
getImage(ImageCell imageCell)
Returns the cached image for the specified image, can be null. |
boolean |
isCached(ImageCell imageCell)
Returns if the tableimage is cached or not. |
void |
reloadCachedImage(ImageCell imageCell)
Tells the cache to reload the cached image. |
void |
removeCachedImage(ImageCell imageCell)
Clears the cached image from the cache. |
void |
setImage(ImageModel imageModel,
java.awt.Image image)
Notifies the thumbnail viewer that the supplied image has been updated. |
void |
setMessage(ImageModel imageModel,
java.lang.String msg)
Notifies the thumbnail viewer that the image couldnt be loaded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageCache(ImageLoadingListener listener)
listener
- a image loading listener.public ImageCache(ImageLoadingListener listener, int cacheMax)
listener
- a image loading listener.cacheMax
- the maximum number of images to cache.Method Detail |
---|
public int getCachedImagesCount()
public java.awt.image.BufferedImage getImage(ImageCell imageCell)
imageCell
- the image cell to get the cached image for.
public void reloadCachedImage(ImageCell imageCell)
imageCell
- the cell that needs a new image.public boolean isCached(ImageCell imageCell)
imageCell
- the lookup object.
public void clear()
public void removeCachedImage(ImageCell imageCell)
imageCell
- the image cells cached image to remove.public void setImage(ImageModel imageModel, java.awt.Image image)
setImage
in interface ThumbnailViewer
imageModel
- the image properties detailing which image that was updated.image
- the new raw image as an imagedata object.public void setMessage(ImageModel imageModel, java.lang.String msg)
setMessage
in interface ThumbnailViewer
imageModel
- the image properties detailing which image that was updated.msg
- the message stating what happened
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |