Class Viewer.Paint.PaintObject
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Viewer.Paint.PaintObject

Object
   |
   +----Viewer.Paint.PaintObject

public abstract class PaintObject
extends Object
This class ist the superclass of all drawing objects. These objects consits of a vector of point represention the outline and a shape containing the geographic form.
These objects can be display or image relative.
These objects can be a shutter.
These objects can be filled and unfilled.

Author:
Klaus Kleber
Since:
30.04.1999
See Also:
Circle2DObject, CurveObject, Ellipse2DObject, InterpolatedObject, Line2DObject, PolylineObject, Rectangle2DObject

Variable Index

 o STATUS_BEGIN
The creation of the PaintObject has started.
 o STATUS_NULL
The PaintObject is empty
 o STATUS_STOP
The PaintObject is created.
 o STATUS_WORK
The PaintObject is empty
 o filled
Specified if the PaintObject is filled.
 o isDisplayRelative
if true the PaintObject is display relative if false the PaintObject ist imageRelative.
 o isShutter
True, if the PaintObject is a shutter.
 o objectPoints
Vector which contains the points of the PaintObject.
 o status
Creation status of the PaintObject.

Constructor Index

 o Viewer.Paint.PaintObject()
Constructs an empty PaintObject.
 o Viewer.Paint.PaintObject(boolean)
Constructs a new filled PaintObject .

Method Index

 o contains(Point2D. Float)
Tests if the specified Point is inside the boundary of the Shape.
 o copy()
Returns a real copy of the PaintObject.
 o drawTransformedShape(Graphics2D, AffineTransform)
Draws the Shape of the PaintObject with the specified transformations in the specified Graphics context.
 o getCopyPointAt(int)
Gets a copy of the Point at the specified index.
 o getInfo()
Returns a String representing this PaintObject
 o getMovePaintObject(Point2D. Float)
Returns the part of the PaintObject which should be redraw if the PaintObejct will be creating.
 o getNewPaintObject()
Returns new PaintObject with the same properties as the current object.
 o getObjectPoints()
Gets the ObjectPoints .
 o getPoint(int)
Return the Point on the specified index in the objectPoints.
 o getShape()
Returns the Shape of the PaintObject build form the Points in the PaintObject
 o getStatus()
Gets the status of the PaintObject.
 o getType()
Return the type of the PaintObject.
 o isClosed()
Returns true if the PaintObject is closed.
 o setFilled(boolean)
Fills/Unfills the PaintObject
 o setNewPoint(Point2D. Float)
Insert a new Point to the PaintObject.
 o setStatus(int)
Sets the status of the PaintObject.

Variables

 o STATUS_BEGIN
public static int STATUS_BEGIN
The creation of the PaintObject has started.

Since: 30.04.1999
 o STATUS_NULL
public static int STATUS_NULL
The PaintObject is empty

Since: 30.04.1999
 o STATUS_STOP
public static int STATUS_STOP
The PaintObject is created.

Since: 30.04.1999
 o STATUS_WORK
public static int STATUS_WORK
The PaintObject is empty

Since: 30.04.1999
 o filled
public boolean filled
Specified if the PaintObject is filled.

 o isDisplayRelative
public boolean isDisplayRelative
if true the PaintObject is display relative if false the PaintObject ist imageRelative.

Since: 30.04.1999
 o isShutter
public boolean isShutter
True, if the PaintObject is a shutter.

Since: 30.04.1999
 o objectPoints
public java.util.Vector objectPoints
Vector which contains the points of the PaintObject.

 o status
public int status
Creation status of the PaintObject.

Constructors

 o PaintObject
public PaintObject()
Constructs an empty PaintObject.

Since:
30.04.1999
 o PaintObject
public PaintObject(boolean filled)
Constructs a new filled PaintObject .

Parameters:
filled - true if the PainObject should be filled
Since:
30.04.1999

Methods

 o contains
public boolean contains(Point2D.Float p)
Tests if the specified Point is inside the boundary of the Shape.

Returns:
true if the specified Point is inside the boundary of the Shape.
Since:
30.04.1999
 o copy
public abstract Viewer.Paint.PaintObject copy()
Returns a real copy of the PaintObject.

Returns:
a real copy of this PaintObject.
Since:
30.04.1999
 o drawTransformedShape
public void drawTransformedShape(Graphics2D g,
                                 AffineTransform aff)
Draws the Shape of the PaintObject with the specified transformations in the specified Graphics context.

Parameters:
g - The Graphics context iin which the Shape should be drawn.
aff - Contains the transformation appling to the Shpae before drawing.
Since:
30.04.1999
 o getCopyPointAt
public java.awt.geom.Point2D. Float getCopyPointAt(int index)
Gets a copy of the Point at the specified index.

Parameters:
index - The point at the specified index.
Returns:
A copy of the Point at the specified index.
Since:
30.04.1999
 o getInfo
public java.lang.String getInfo()
Returns a String representing this PaintObject

Returns:
A String representing this PaintObject
Since:
30.04.1999
 o getMovePaintObject
public abstract Viewer.Paint.PaintObject getMovePaintObject(Point2D.Float nextPoint)
Returns the part of the PaintObject which should be redraw if the PaintObejct will be creating. For example if you create a PolylineObject you have to add points. The points will be connect wiht a line. If you add a new Point with the mouse, the last point of the PolylineObject will be connected with the Point of the mouse cursor. These line you have to dedraw many times. These Method should give you these part of the PaintObject which should be redraw in such cases.

Parameters:
nextPoint - The next drawing Point.
Returns:
The part of the PaintObject which should be redraw.
Since:
30.04.1999
 o getNewPaintObject
public abstract Viewer.Paint.PaintObject getNewPaintObject()
Returns new PaintObject with the same properties as the current object.

Returns:
A new PaintObject with the same properties.
Since:
30.04.1999
 o getObjectPoints
public java.util.Vector getObjectPoints()
Gets the ObjectPoints .

Returns:
The ObjectPoints.
Since:
30.04.1999
 o getPoint
public java.awt.geom.Point2D. Float getPoint(int index)
Return the Point on the specified index in the objectPoints.

Returns:
The Point on the specified index in the objectPoints.
Since:
30.04.1999
 o getShape
public abstract java.awt.Shape getShape()
Returns the Shape of the PaintObject build form the Points in the PaintObject

Returns:
The Point on the specified index in the objectPoints.
Since:
30.04.1999
 o getStatus
public int getStatus()
Gets the status of the PaintObject.

Returns:
The status of the PaintObject.
Since:
30.04.1999
 o getType
public int getType()
Return the type of the PaintObject. If type = 1 the PaintObject is display relative, if type = 0 the PaintObject is image relative.

Returns:
The yype of the PaintObject.
Since:
30.04.1999
 o isClosed
public boolean isClosed()
Returns true if the PaintObject is closed. A PaintObject is closed if the first Point in objectPoints is equal the last Point and the Vector objectPoints contains more than 2 Points.

Returns:
ture if the PaintObject is closed
Since:
30.04.1999
 o setFilled
public void setFilled(boolean filled)
Fills/Unfills the PaintObject

Parameters:
filled - true - the PaintObject should be filled.
Since:
30.04.1999
 o setNewPoint
public abstract void setNewPoint(Point2D.Float newPoint)
Insert a new Point to the PaintObject.

Parameters:
newPoint - The new Point for the PaintObject.
Since:
30.04.1999
 o setStatus
public void setStatus(int status)
Sets the status of the PaintObject.

Parameters:
status - The new status of the PaintObject.
Since:
30.04.1999

All Packages  Class Hierarchy  This Package  Previous  Next  Index