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

Class Viewer.Presentation.PresentationStateGraphicObject

Object
   |
   +----PresentationStateLayerObject
           |
           +----PresentationStateAnnotationObject
                   |
                   +----Viewer.Presentation.PresentationStateGraphicObject

public class PresentationStateGraphicObject
extends PresentationStateAnnotationObject
This class handles the graphic annoations. This class implementing only the GUI-based methods, the data are stored in the c++ interface jDVPSGraphicObject. Every PresentationStateGraphicObject must have one jDVPSGraphicObject which stores the data of a graphic annotation.
Each jDVPSGraphicObject has an index in the jDVPresentationState, this index must be the same as the index in this class ( defined in the super class PresentationStateLayerObject).

Author:
Klaus Kleber
Since:
30.04.1999
See Also:
PresentationStateAnnotatonObject, PresentationStateLayerObject, jDVPSGraphicObject

Constructor Index

 o Viewer.Presentation.PresentationStateGraphicObject(jDVPSGraphicObject, int, int, float[], int, boolean, Dimension, AffineTransform)
Constructs a new PresentationStateGraphicObject and sets the specified attributs in the jDVPSGraphicObject.
 o Viewer.Presentation.PresentationStateGraphicObject(jDVPSGraphicObject, int)
Constructs a PresentationStateGraphicObject form the specified jDVPSGraphicObject with the specified index

Method Index

 o buildShape()
 o contains(Point2D. Float)
Check if this object contains the specified point.
 o convert()
If the annotation units is display relative this function converts the annotation to image relative and vice versa.
 o deleteAll()
Deletes the object.
 o draw(Graphics2D, AffineTransform)
Draws the shape of the graphics annotation with the specified transformation in the specified Graphics2d object
 o drawBounding(Graphics2D, AffineTransform)
Marked the PresentationStateGraphicObject with Rectangles in the specified Graphics2D context.
 o getAnnotationUnits()
Gets the graphic annotation units.
 o getInfo()
Returns a String representing this object.
 o getListText()
Returns a String representing this object.The string contains the graphic type of the annotation and the annatation unit.
 o isClosed()
Checks if the PresentationStateGraphicObject is closed.
 o isfilled()
Checks if the graphic annotation is filled.
 o moveTo(Point2D. Float, Point2D. Float)
Moves the PresentationStateGraphicObject analog to the specified points.
 o setFilled(boolean)
Filles/unfilles the annotation.
 o setScreenSize(Dimension)
Rebuilds the display relative annotations if the size for displaying the image has changed.

Constructors

 o PresentationStateGraphicObject
public PresentationStateGraphicObject(jDVPSGraphicObject graphicObject,
                                      int index,
                                      int type,
                                      float pointList,
                                      int annotationUnits,
                                      boolean isFilled,
                                      Dimension screenSize,
                                      AffineTransform aff)
Constructs a new PresentationStateGraphicObject and sets the specified attributs in the jDVPSGraphicObject.

Parameters:
graphicObject - Contains the data of a graphic annotation in a c++ interface.
index - Contains the index of the PresentationStateGraphicObject.
type - Contains the new graphic type of the jDVPSGraphicObject.
pointList - Contains the new points of the jDVPSGraphicObject.
annotationUnits - Contains the new annotation units.
isFilled - True if the jDVPSGraphicObject shuold be set to filled.
screenSize - Contains the size for displaying.
aff - Contains the applying transformations.
Since:
30.04.1999
 o PresentationStateGraphicObject
public PresentationStateGraphicObject(jDVPSGraphicObject graphicObject,
                                      int index)
Constructs a PresentationStateGraphicObject form the specified jDVPSGraphicObject with the specified index

Parameters:
graphicObject - Contains the data of a graphic annotation in a c++ interface.
index - Contains the index of the PresentationStateGraphicObject.
Since:
30.04.1999

Methods

 o buildShape
public void buildShape()
 o contains
public boolean contains(Point2D.Float point)
Check if this object contains the specified point.

Returns:
true if this object contains the specified point.
Overrides:
contains in class PresentationStateLayerObject
Since:
30.04.1999
 o convert
public void convert()
If the annotation units is display relative this function converts the annotation to image relative and vice versa.

Since:
30.04.1999
 o deleteAll
public void deleteAll()
Deletes the object.

Overrides:
deleteAll in class PresentationStateLayerObject
Since:
30.04.1999
 o draw
public void draw(Graphics2D g2,
                 AffineTransform aff)
Draws the shape of the graphics annotation with the specified transformation in the specified Graphics2d object

Parameters:
g2 - The context in which this object will be drawn.
aff - Contains the applying transformation.
Overrides:
draw in class PresentationStateLayerObject
Since:
30.04.1999
 o drawBounding
public void drawBounding(Graphics2D g2,
                         AffineTransform aff)
Marked the PresentationStateGraphicObject with Rectangles in the specified Graphics2D context.

Parameters:
g2 - The context in which this object will be merked.
aff - Contains the applying transformation.
Overrides:
drawBounding in class PresentationStateLayerObject
Since:
30.04.1999
 o getAnnotationUnits
public int getAnnotationUnits()
Gets the graphic annotation units.

Returns:
graphic annotation units.
Since:
30.04.1999
See Also:
getAnnotationUnits
 o getInfo
public java.lang.String getInfo()
Returns a String representing this object.

Returns:
A String representing this object
Overrides:
getInfo in class PresentationStateLayerObject
Since:
30.04.1999
 o getListText
public java.lang.String getListText()
Returns a String representing this object.The string contains the graphic type of the annotation and the annatation unit.

Returns:
A String representing this object.
Overrides:
getListText in class PresentationStateLayerObject
Since:
30.04.1999
 o isClosed
public boolean isClosed()
Checks if the PresentationStateGraphicObject is closed. An PresentationStateGraphicObject is cloed if the fist and the last point are equal and the PresentationStateGraphicObject has more than 2 points.

Returns:
True if the annotation is closed.
Since:
30.04.1999
 o isfilled
public boolean isfilled()
Checks if the graphic annotation is filled.

Returns:
True if graphic is filled.
Since:
30.04.1999
See Also:
isFilled
 o moveTo
public void moveTo(Point2D.Float moveAnn,
                   Point2D.Float point)
Moves the PresentationStateGraphicObject analog to the specified points. The first point is the start point and the secound point is the point where the first point is moved to. The PresentationStateGraphicObject will be moved analog to the result vector.

Parameters:
moveAnn - Start moving point.
point - Stop moving point.
Overrides:
moveTo in class PresentationStateLayerObject
Since:
30.04.1999
 o setFilled
public void setFilled(boolean filled)
Filles/unfilles the annotation.

Parameters:
filled - True if the annatation shuold be filled.
Since:
30.04.1999
See Also:
setFilled
 o setScreenSize
public void setScreenSize(Dimension screenSize)
Rebuilds the display relative annotations if the size for displaying the image has changed.

Parameters:
The - new screensize of the annotation.
Overrides:
setScreenSize in class PresentationStateAnnotationObject
Since:
30.04.1999

All Packages  Class Hierarchy  This Package  Previous  Next  Index