public class GJGifSequencer extends GifSequenceWriter implements GJSequencerInterface, java.awt.event.ActionListener
gifWriter, imageMetaData, imageWriteParam
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
add()
Add the graphics of the component as a new frame to the GIF.
|
void |
close()
Closes the GIF writer and associated output streams.
|
void |
close(java.lang.String filename)
Close call used when a memory cached output stream is used.
|
static GJGifSequencer |
createInstance(java.awt.Component comp,
int interval,
boolean loopFlag)
Factory method to create a GIF writer using a memory cache for output.
|
static GJGifSequencer |
createInstance(java.lang.String fileName,
java.awt.Component comp,
int interval,
boolean loopFlag)
Factory method to create a GIF writer writing to a file output stream.
|
boolean |
isMemoryCached()
Returns true is this GIF writer users a memory
MemoryCacheImageOutputStream, false otherwise.
|
writeToSequence
public static GJGifSequencer createInstance(java.lang.String fileName, java.awt.Component comp, int interval, boolean loopFlag) throws java.io.FileNotFoundException, javax.imageio.IIOException, java.io.IOException
fileName
- String description of the file to writecomp
- the Component to animateinterval
- interval between frames (ms)loopFlag
- true to loop continuouslyjava.io.FileNotFoundException
javax.imageio.IIOException
java.io.IOException
public static GJGifSequencer createInstance(java.awt.Component comp, int interval, boolean loopFlag) throws java.io.IOException
comp
- the Component to animateinterval
- interval between frames (ms)loopFlag
- true to loop continuouslyjava.io.FileNotFoundException
javax.imageio.IIOException
java.io.IOException
public void add() throws java.io.IOException
add
in interface GJSequencerInterface
java.io.IOException
public void close() throws java.io.IOException
close
in class GifSequenceWriter
java.io.IOException
public void close(java.lang.String filename) throws java.io.IOException
filename
- String descriptor of the file to write.java.io.IOException
public boolean isMemoryCached()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener