Package de.cerus.packetmaps.core.pmcache
Class FramedCache
- java.lang.Object
-
- de.cerus.packetmaps.core.pmcache.FramedCache
-
-
Field Summary
Fields Modifier and Type Field Description static intID
-
Constructor Summary
Constructors Constructor Description FramedCache(int frameCount, int delayBetweenFrames, java.awt.Dimension dimension, byte[][] cachedFrames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FramedCachebuildCache(de.cerus.jgif.GifImage gifImage, java.awt.Dimension dimension, int delay, NmsAdapter nmsAdapter)Creates a cache of a gifstatic FramedCacheconvert(DrawAdapter drawAdapter, java.awt.Dimension dimension, NmsAdapter nmsAdapter)byte[][]getCachedFrames()intgetDelayBetweenFrames()java.awt.DimensiongetDimension()intgetFrameCount()intgetId()voidread(java.io.DataInputStream inputStream)voidresize(java.awt.Dimension newDimension)Resizes the cache Warning: Caches can only be made bigger!voidwrite(java.io.DataOutputStream outputStream)
-
-
-
Field Detail
-
ID
public static final int ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
convert
public static FramedCache convert(DrawAdapter drawAdapter, java.awt.Dimension dimension, NmsAdapter nmsAdapter)
-
buildCache
public static FramedCache buildCache(de.cerus.jgif.GifImage gifImage, java.awt.Dimension dimension, int delay, NmsAdapter nmsAdapter)
Creates a cache of a gif- Parameters:
gifImage- The gifdimension- The dimensionnmsAdapter- The nms adapter- Returns:
- The cache
-
write
public void write(java.io.DataOutputStream outputStream) throws java.io.IOException
-
read
public void read(java.io.DataInputStream inputStream) throws java.io.IOException
-
resize
public void resize(java.awt.Dimension newDimension)
Resizes the cache Warning: Caches can only be made bigger! Making a cache smaller will *not* work.- Parameters:
newDimension- The new dimension
-
getFrameCount
public int getFrameCount()
-
getCachedFrames
public byte[][] getCachedFrames()
-
getDimension
public java.awt.Dimension getDimension()
-
getDelayBetweenFrames
public int getDelayBetweenFrames()
-
-