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
-
STATUS_BEGIN
- The creation of the PaintObject has started.
-
STATUS_NULL
- The PaintObject is empty
-
STATUS_STOP
- The PaintObject is created.
-
STATUS_WORK
- The PaintObject is empty
-
filled
- Specified if the PaintObject is filled.
-
isDisplayRelative
- if true the PaintObject is display relative if false the PaintObject ist imageRelative.
-
isShutter
- True, if the PaintObject is a shutter.
-
objectPoints
- Vector which contains the points of the PaintObject.
-
status
- Creation status of the PaintObject.
-
Viewer.Paint.PaintObject()
- Constructs an empty PaintObject.
-
Viewer.Paint.PaintObject(boolean)
- Constructs a new filled PaintObject .
-
contains(Point2D. Float)
- Tests if the specified Point is inside the boundary of the Shape.
-
copy()
- Returns a real copy of the PaintObject.
-
drawTransformedShape(Graphics2D, AffineTransform)
- Draws the Shape of the PaintObject with the specified transformations in the specified Graphics context.
-
getCopyPointAt(int)
- Gets a copy of the Point at the specified index.
-
getInfo()
- Returns a String representing this PaintObject
-
getMovePaintObject(Point2D. Float)
- Returns the part of the PaintObject which should be redraw if the PaintObejct will be creating.
-
getNewPaintObject()
- Returns new PaintObject with the same properties as the current object.
-
getObjectPoints()
- Gets the ObjectPoints .
-
getPoint(int)
- Return the Point on the specified index in the objectPoints.
-
getShape()
- Returns the Shape of the PaintObject build form the Points in the PaintObject
-
getStatus()
- Gets the status of the PaintObject.
-
getType()
- Return the type of the PaintObject.
-
isClosed()
- Returns true if the PaintObject is closed.
-
setFilled(boolean)
- Fills/Unfills the PaintObject
-
setNewPoint(Point2D. Float)
- Insert a new Point to the PaintObject.
-
setStatus(int)
- Sets the status of the PaintObject.
STATUS_BEGIN
public static int STATUS_BEGIN
- The creation of the PaintObject has started.
- Since:
30.04.1999
STATUS_NULL
public static int STATUS_NULL
- The PaintObject is empty
- Since:
30.04.1999
STATUS_STOP
public static int STATUS_STOP
- The PaintObject is created.
- Since:
30.04.1999
STATUS_WORK
public static int STATUS_WORK
- The PaintObject is empty
- Since:
30.04.1999
filled
public boolean filled
- Specified if the PaintObject is filled.
isDisplayRelative
public boolean isDisplayRelative
- if true the PaintObject is display relative if false the PaintObject ist imageRelative.
- Since:
30.04.1999
isShutter
public boolean isShutter
- True, if the PaintObject is a shutter.
- Since:
30.04.1999
objectPoints
public java.util.Vector objectPoints
- Vector which contains the points of the PaintObject.
status
public int status
- Creation status of the PaintObject.
PaintObject
public PaintObject()
- Constructs an empty PaintObject.
- Since:
- 30.04.1999
PaintObject
public PaintObject(boolean filled)
- Constructs a new filled PaintObject .
- Parameters:
- filled - true if the PainObject should be filled
- Since:
- 30.04.1999
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
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
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
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
getInfo
public java.lang.String getInfo()
- Returns a String representing this PaintObject
- Returns:
- A String representing this PaintObject
- Since:
- 30.04.1999
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
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
getObjectPoints
public java.util.Vector getObjectPoints()
- Gets the ObjectPoints .
- Returns:
- The ObjectPoints.
- Since:
- 30.04.1999
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
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
getStatus
public int getStatus()
- Gets the status of the PaintObject.
- Returns:
- The status of the PaintObject.
- Since:
- 30.04.1999
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
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
setFilled
public void setFilled(boolean filled)
- Fills/Unfills the PaintObject
- Parameters:
- filled - true - the PaintObject should be filled.
- Since:
- 30.04.1999
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
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