edu.umd.cs.jazz.component
Class ZPolygon
java.lang.Object
|
+--edu.umd.cs.jazz.ZSceneGraphObject
|
+--edu.umd.cs.jazz.ZVisualComponent
|
+--edu.umd.cs.jazz.component.ZBasicVisualComponent
|
+--edu.umd.cs.jazz.component.ZShape
|
+--edu.umd.cs.jazz.component.ZCoordList
|
+--edu.umd.cs.jazz.component.ZPolygon
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, ZAppearance, ZFillColor, ZFillPaint, ZPenColor, ZPenPaint, ZSerializable, ZStroke
- public class ZPolygon
- extends ZCoordList
ZPolygon is a visual component for displaying a polygonal
shape.
Warning: Serialized and ZSerialized objects of this class will not be
compatible with future Jazz releases. The current serialization support is
appropriate for short term storage or RMI between applications running the
same version of Jazz. A future release of Jazz will provide support for long
term persistence.
- Author:
- Benjamin B. Bederson, Jesse Grosjean
- See Also:
- Serialized Form
Constructor Summary |
ZPolygon()
Constructs a new ZPolygon with no points. |
ZPolygon(double[] xp,
double[] yp)
Constructs a new ZPolygon from an array of points. |
ZPolygon(double x,
double y)
Constructs a new ZPolygon with a single point. |
ZPolygon(double x1,
double y1,
double x2,
double y2)
Constructs a new ZPolygon with a two points |
ZPolygon(java.awt.geom.Point2D pt)
Constructs a new ZPolygon with a single point. |
ZPolygon(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
Constructs a new ZPolygon with two points. |
ZPolygon(ZPolyline aPolyline)
Constructs a new ZPolygon with no points. |
Method Summary |
protected edu.umd.cs.jazz.component.ZCoordListShape |
getCoordListShape()
Get the shape defined by the coords. |
Methods inherited from class edu.umd.cs.jazz.component.ZCoordList |
add, add, add, add, duplicateObject, getNumberPoints, getShape, getX, getXCoords, getY, getYCoords, isClosed, lineTo, moveTo, setClosed, setCoords, setCoords, setState, writeObject |
Methods inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent |
getAbsPenWidth, getFillColor, getFillPaint, getPenColor, getPenPaint, getPenWidth, getPenWidthForCurrentContext, getStroke, setAbsPenWidth, setFillColor, setFillPaint, setPenColor, setPenPaint, setPenWidth, setStroke |
Methods inherited from class edu.umd.cs.jazz.ZVisualComponent |
addParent, getNumParents, getParents, getParentsReference, getRoot, paint, pickBounds, removeParent, repaint, repaint, trimToSize, updateBounds, updateObjectReferences, updateParentBounds, updateVolatility, writeObjectRecurse |
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
addMouseListener, addMouseMotionListener, clone, dump, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getListenerList, getVolatileBounds, hasLisenerOfType, hasMouseListener, processMouseEvent, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZPolygon
public ZPolygon()
- Constructs a new ZPolygon with no points.
ZPolygon
public ZPolygon(java.awt.geom.Point2D pt)
- Constructs a new ZPolygon with a single point.
- Parameters:
pt
- Initial point
ZPolygon
public ZPolygon(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
- Constructs a new ZPolygon with two points.
- Parameters:
pt1
- First pointpt2
- Second point
ZPolygon
public ZPolygon(double x,
double y)
- Constructs a new ZPolygon with a single point.
- Parameters:
x,y
- Initial point
ZPolygon
public ZPolygon(double x1,
double y1,
double x2,
double y2)
- Constructs a new ZPolygon with a two points
- Parameters:
x,y
- First pointx,y
- Second point
ZPolygon
public ZPolygon(double[] xp,
double[] yp)
- Constructs a new ZPolygon from an array of points.
- Parameters:
xp
- Array of X pointsyp
- Array of Y points
ZPolygon
public ZPolygon(ZPolyline aPolyline)
- Constructs a new ZPolygon with no points.
getCoordListShape
protected edu.umd.cs.jazz.component.ZCoordListShape getCoordListShape()
- Get the shape defined by the coords.
- Overrides:
getCoordListShape
in class ZCoordList
Copyright © 2001 by University of Maryland, College Park, MD 20742, USA All rights reserved.