All Packages Class Hierarchy This Package Previous Next Index
Class fi.faidon.jvg.GraphicsRecording
java.lang.Object
|
+----fi.faidon.jvg.VectorImageProducer
|
+----fi.faidon.jvg.GraphicsRecording
- public class GraphicsRecording
- extends VectorImageProducer
Class for storing graphical operations and the objects related to
them.
-
GZIP_COMPRESSION
-
-
IMG_FILE_SIGNATURE
-
-
NO_COMPRESSION
-
-
GraphicsRecording()
- Construct a new graphics operation with the give operation code.
-
addOperation(Object[])
- Add an operation to the recording.
-
addOperation(Vector)
- Add an operation to the recording.
-
checkImage()
- Return the status as a function of the state of all images.
-
getHeight()
- Always return -1 for the moment.
-
getImages()
- Get an array of all Image objects in the recording.
-
getWidth()
- Always return -1 for the moment.
-
isVerbose()
- Verbose mode or not?.
-
playIt(Graphics, Component)
- Play the recorded operations into the given Graphics object.
-
readFromFile(File)
- Restore the object variables from the given file.
-
saveToFile(File)
- Save the operations vector to a file.
-
setVerbose(boolean)
- Set or clear verbose mode.
IMG_FILE_SIGNATURE
public static final byte IMG_FILE_SIGNATURE[]
NO_COMPRESSION
public static final int NO_COMPRESSION
GZIP_COMPRESSION
public static final int GZIP_COMPRESSION
GraphicsRecording
public GraphicsRecording()
- Construct a new graphics operation with the give operation code.
isVerbose
public boolean isVerbose()
- Verbose mode or not?.
setVerbose
public void setVerbose(boolean isVerbose)
- Set or clear verbose mode.
addOperation
public void addOperation(Object opObjects[])
- Add an operation to the recording.
addOperation
public void addOperation(Vector opObjects)
- Add an operation to the recording. Operation objects are stored in
a vector.
getImages
public Image[] getImages()
- Get an array of all Image objects in the recording. This is useful for
doing "checkImage"s on them in order to avoid screen flicker.
getWidth
public int getWidth()
- Always return -1 for the moment. This information is not too interesting
for vector images.
- Overrides:
- getWidth in class VectorImageProducer
getHeight
public int getHeight()
- Always return -1 for the moment. This information is not too interesting
for vector images.
- Overrides:
- getHeight in class VectorImageProducer
playIt
public void playIt(Graphics g,
Component drawComponent)
- Play the recorded operations into the given Graphics object. "drawComponent"
is the component that the graphics belongs to, necessary for setting the
background color and for image drawing (where we need an ImageObserver).
- Overrides:
- playIt in class VectorImageProducer
checkImage
public int checkImage()
- Return the status as a function of the state of all images.
- Overrides:
- checkImage in class VectorImageProducer
readFromFile
public synchronized boolean readFromFile(File f)
- Restore the object variables from the given file.
saveToFile
public synchronized boolean saveToFile(File f)
- Save the operations vector to a file. We just use standard Java
serialisation for this, except for pixmaps and special file/object
data. Return true if successful save. This method is synchronized
since we don't want anyone to mess around with the saved operations
before saving is finished.
All Packages Class Hierarchy This Package Previous Next Index