com.sun.jimi.core.component
Class ImageCache

java.lang.Object
  |
  +--com.sun.jimi.core.component.ImageCache

public class ImageCache
extends java.lang.Object

Cache for JimiReaders of multi-frame images. The cache wraps around when requesting an image beyond the end.


Field Summary
 java.util.Vector cachedImages
           
 int cacheSize
           
 int currentIndex
           
 java.util.Enumeration rasterImages
           
 boolean seriesFinished
           
 boolean wrap
           
 
Constructor Summary
ImageCache(JimiReader reader, boolean wrap)
           
 
Method Summary
 boolean allImagesCached()
           
 JimiRasterImage getCachedImage(int index)
          Pull an image out of the cache.
 JimiRasterImage getImage(int index)
           
 JimiRasterImage getNextImage()
           
 JimiRasterImage getPreviousImage()
           
 boolean hasNextImage()
           
 boolean hasPreviousImage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rasterImages

public java.util.Enumeration rasterImages

cachedImages

public java.util.Vector cachedImages

cacheSize

public int cacheSize

wrap

public boolean wrap

seriesFinished

public boolean seriesFinished

currentIndex

public int currentIndex
Constructor Detail

ImageCache

public ImageCache(JimiReader reader,
                  boolean wrap)
Method Detail

getImage

public JimiRasterImage getImage(int index)
                         throws java.util.NoSuchElementException

allImagesCached

public boolean allImagesCached()

getCachedImage

public JimiRasterImage getCachedImage(int index)
                               throws java.util.NoSuchElementException
Pull an image out of the cache.

getNextImage

public JimiRasterImage getNextImage()

getPreviousImage

public JimiRasterImage getPreviousImage()

hasNextImage

public boolean hasNextImage()

hasPreviousImage

public boolean hasPreviousImage()