Class Viewer.Presentation.PaintStructure
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Viewer.Presentation.PaintStructure

Object
   |
   +----Viewer.Presentation.PaintStructure

public class PaintStructure
extends Object
This class manages the drawing and manipulating of the currently active objects on the display.

Author:
Klaus Kleber
Since:
30.04.1999

Variable Index

 o aff
Contains the current transformation for drawing objects.
 o currentObject
Contains the currently active PresentationStateLayerObject on the display if exist.
 o oldPaintObject
Contains the a help value .

Constructor Index

 o Viewer.Presentation.PaintStructure(PresentationStateGraphicsHandler)
Constructs a new object.

Method Index

 o deleteCurrentPaintObject()
Deletes the currentPaintObject.
 o drawState(Graphics2D)
Draws the current state of the paintStructure in the xorMode.
 o getCurrentPaintObject()
Gets the currentPaintObject
 o getInverseTransformedPoint(Point2D. Float)
Returns the inverse transformed point form the AffineTransformation aff.
 o movePresentationStateGraphicObject(Point2D. Float)
Moves the currentObject if this object is a PresentationStateGraphicObject.
 o movePresentationStateTextObject(Point2D. Float)
Moves the currentObject if this object is a PresentationStateTextObject to the specified point.
 o reset()
Resets the paintStructure.
 o setCurrentObject(PresentationStateLayerObject, boolean)
Sets a new currentObject and draws it with the xorMode in the imageCanvas
 o setCurrentPaintObject(PaintObject)
Sets the currentPaintObject
 o setCurrentStatus(int)
Sets the specified status to the currentPaintObject.
 o setDisplayRelative(boolean)
Sets the currentPaintObject to image relative or display relative.
 o setFilled(boolean)
Fills/unfills the currentPaintObject.
 o setImageCanvas(Canvas)
Sets the Canvas in which the you can draw.
 o setMoveAnn(Point2D. Float)
Sets a new Point for moveAnn
 o setNewPoint(Point2D. Float)
Insert a new point to the currentPaintObject.
 o setPaintPoint(Point2D. Float)
Paints a new Point to the currentPaintObject, removes the last Point and draws the currentPaintObject with the xorMode in the imageCanvas.
 o setWorkingShape(PaintObject)
Deletes the currentPaintobject, overwites the geometic representation in the imageCanvas in the xorMode, sets the specified PaintObject as the new PaintObejct and draws this object in the imageCanvas with the xorMode.

Variables

 o aff
public java.awt.geom.AffineTransform aff
Contains the current transformation for drawing objects.

Since: 30.04.1999
 o currentObject
public Viewer.Presentation.PresentationStateLayerObject currentObject
Contains the currently active PresentationStateLayerObject on the display if exist. If a PresentationStateLayerObject is active you can manipulate this object in the Canvas.

Since: 30.04.1999
See Also:
PresentationStateLayerObject
 o oldPaintObject
public Viewer.Paint.PaintObject oldPaintObject
Contains the a help value . This Object is painted in the xorMode because it saves speed.

Since: 30.04.1999

Constructors

 o PaintStructure
public PaintStructure(PresentationStateGraphicsHandler presentationStateGraphicsHandler)
Constructs a new object.

Parameters:
presentationStateGraphicsHandler - Contains the current PresentationStateGraphicsHandler
Since:
30.04.1999

Methods

 o deleteCurrentPaintObject
public void deleteCurrentPaintObject()
Deletes the currentPaintObject.

Since:
30.04.1999
 o drawState
public void drawState(Graphics2D g2)
Draws the current state of the paintStructure in the xorMode.

Since:
30.04.1999
 o getCurrentPaintObject
public Viewer.Paint.PaintObject getCurrentPaintObject()
Gets the currentPaintObject

Returns:
The currentPaintObject.
Since:
30.04.1999
 o getInverseTransformedPoint
public java.awt.geom.Point2D. Float getInverseTransformedPoint(Point2D.Float displayPoint)
Returns the inverse transformed point form the AffineTransformation aff.

Parameters:
displayPoint - The transforming point.
Returns:
The inverse transformed point
Since:
30.04.1999
 o movePresentationStateGraphicObject
public void movePresentationStateGraphicObject(Point2D.Float point)
Moves the currentObject if this object is a PresentationStateGraphicObject. The moving size and the direction depends form the Point moveAnn (defined in this class) and the specified point.

Parameters:
point - The next point where the currentObject have to moved.
Since:
30.04.1999
 o movePresentationStateTextObject
public void movePresentationStateTextObject(Point2D.Float point)
Moves the currentObject if this object is a PresentationStateTextObject to the specified point. There are two types of moving: First you can move the bounding box of the PresentationStateTextObject. Secoundly you can move the anchor point of the PresentationStateTextObject. Which type of moving is used depends from the properties of the PresentationStateTextObject.

Parameters:
point - The next point where the PresentationStateTextObject have to moved.
Since:
30.04.1999
 o reset
public void reset()
Resets the paintStructure.

Since:
30.04.1999
 o setCurrentObject
public void setCurrentObject(PresentationStateLayerObject newCurrentObject,
                             boolean redrawOld)
Sets a new currentObject and draws it with the xorMode in the imageCanvas

Parameters:
newCurrentObject - The new currentObject.
redrawOld - If true drwas the old currentObject with the xorMode in the imageCanvas.
Since:
30.04.1999
 o setCurrentPaintObject
public void setCurrentPaintObject(PaintObject newPaintObject)
Sets the currentPaintObject

Parameters:
The - new PaintObject.
Since:
30.04.1999
 o setCurrentStatus
public void setCurrentStatus(int status)
Sets the specified status to the currentPaintObject.

Parameters:
status - Specifies the new status of the current PaintObject
Since:
30.04.1999
 o setDisplayRelative
public void setDisplayRelative(boolean isDisplayRelative)
Sets the currentPaintObject to image relative or display relative.

Parameters:
isDisplayRelative - True sets the currentPaintObject to display relative, false sets the currentPaintObject to imageRelative.
Since:
30.04.1999
 o setFilled
public void setFilled(boolean filled)
Fills/unfills the currentPaintObject.

Parameters:
filled - Fills/unfills the currentPaintObject.
Since:
30.04.1999
 o setImageCanvas
public void setImageCanvas(Canvas imageCanvas)
Sets the Canvas in which the you can draw.

Parameters:
imageCanvas - The new Canvas.
Since:
30.04.1999
 o setMoveAnn
public void setMoveAnn(Point2D.Float newPoint)
Sets a new Point for moveAnn

Parameters:
The - new value
Since:
30.04.1999
 o setNewPoint
public void setNewPoint(Point2D.Float newPoint)
Insert a new point to the currentPaintObject. If the status of the PaintObejct becomes STATUS_STOP, the PointObject will be transformed to a PresentationStateGraphicObject.

Parameters:
newPoint - Specifies the new point of the PaintObject.
Since:
30.04.1999
 o setPaintPoint
public void setPaintPoint(Point2D.Float nextPoint)
Paints a new Point to the currentPaintObject, removes the last Point and draws the currentPaintObject with the xorMode in the imageCanvas.

Parameters:
newPoint - Specifies the new point of the currentPaintObject.
Since:
30.04.1999
 o setWorkingShape
public void setWorkingShape(PaintObject thePaintObject)
Deletes the currentPaintobject, overwites the geometic representation in the imageCanvas in the xorMode, sets the specified PaintObject as the new PaintObejct and draws this object in the imageCanvas with the xorMode.

Parameters:
thePaintObject - Specifies the new PaintObject
Since:
30.04.1999

All Packages  Class Hierarchy  This Package  Previous  Next  Index