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.


Variable Index

 o GZIP_COMPRESSION
 o IMG_FILE_SIGNATURE
 o NO_COMPRESSION

Constructor Index

 o GraphicsRecording()
Construct a new graphics operation with the give operation code.

Method Index

 o addOperation(Object[])
Add an operation to the recording.
 o addOperation(Vector)
Add an operation to the recording.
 o checkImage()
Return the status as a function of the state of all images.
 o getHeight()
Always return -1 for the moment.
 o getImages()
Get an array of all Image objects in the recording.
 o getWidth()
Always return -1 for the moment.
 o isVerbose()
Verbose mode or not?.
 o playIt(Graphics, Component)
Play the recorded operations into the given Graphics object.
 o readFromFile(File)
Restore the object variables from the given file.
 o saveToFile(File)
Save the operations vector to a file.
 o setVerbose(boolean)
Set or clear verbose mode.

Variables

 o IMG_FILE_SIGNATURE
 public static final byte IMG_FILE_SIGNATURE[]
 o NO_COMPRESSION
 public static final int NO_COMPRESSION
 o GZIP_COMPRESSION
 public static final int GZIP_COMPRESSION

Constructors

 o GraphicsRecording
 public GraphicsRecording()
Construct a new graphics operation with the give operation code.

Methods

 o isVerbose
 public boolean isVerbose()
Verbose mode or not?.

 o setVerbose
 public void setVerbose(boolean isVerbose)
Set or clear verbose mode.

 o addOperation
 public void addOperation(Object opObjects[])
Add an operation to the recording.

 o addOperation
 public void addOperation(Vector opObjects)
Add an operation to the recording. Operation objects are stored in a vector.

 o 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.

 o getWidth
 public int getWidth()
Always return -1 for the moment. This information is not too interesting for vector images.

Overrides:
getWidth in class VectorImageProducer
 o getHeight
 public int getHeight()
Always return -1 for the moment. This information is not too interesting for vector images.

Overrides:
getHeight in class VectorImageProducer
 o 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
 o checkImage
 public int checkImage()
Return the status as a function of the state of all images.

Overrides:
checkImage in class VectorImageProducer
 o readFromFile
 public synchronized boolean readFromFile(File f)
Restore the object variables from the given file.

 o 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