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

Field Summary
 
Fields inherited from class edu.umd.cs.jazz.component.ZCoordList
coordListShape
 
Fields inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent
absPenWidth, DEFAULT_ABS_PEN_WIDTH, DEFAULT_FILL_PAINT, DEFAULT_PEN_PAINT, DEFAULT_PEN_WIDTH, DEFAULT_STROKE, fillPaint, penPaint, penWidth, stroke
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, inTransaction, invalidBounds, invalidVolatileBounds, listenerList, volatileBounds, volatileBounds_DEFAULT
 
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, reset, setClosed, setCoords, setCoords, setCoords, setState, writeObject
 
Methods inherited from class edu.umd.cs.jazz.component.ZShape
computeBounds, getFrame, getHeight, getStrokeTransformForAbsPenWidth, getWidth, getX, getY, pick, pickStroke, render
 
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, updateVolatility, writeObjectRecurse
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
addClientProperty, addMouseListener, addMouseMotionListener, clone, computeVolatileBounds, dump, endTransaction, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getClientProperty, getHandles, getListenerList, getVolatileBounds, hasLisenerOfType, hasListenerOfType, hasMouseListener, markInTransaction, markNotInTransaction, processMouseEvent, putClientProperty, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds, startTransaction
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.


ZPolygon

public ZPolygon(java.awt.geom.Point2D pt1,
                java.awt.geom.Point2D pt2)
Constructs a new ZPolygon with two points.


ZPolygon

public ZPolygon(double x,
                double y)
Constructs a new ZPolygon with a single point.


ZPolygon

public ZPolygon(double x1,
                double y1,
                double x2,
                double y2)
Constructs a new ZPolygon with a two points


ZPolygon

public ZPolygon(double[] xp,
                double[] yp)
Constructs a new ZPolygon from an array of points.


ZPolygon

public ZPolygon(ZPolyline aPolyline)
Constructs a new ZPolygon with no points.

Method Detail

getCoordListShape

protected edu.umd.cs.jazz.component.ZCoordListShape getCoordListShape()
Get the shape defined by the coords.

Overrides:
getCoordListShape in class ZCoordList


Copyright � 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.