|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.BaseShape
edu.neu.ccs.gui.BaseVertexShape
edu.neu.ccs.gui.PolygonShape
Class PolygonShape defines a polygon using vertex
data.
This class is a BaseVertexShape whose
Path.Strategy is fixed to be Path.POLYGON.
This class does not use the tangent array inherited from
BaseShape.
To avoid confusion with the class java.awt.Polygon,
we name this class PolygonShape. Our version of a
polygon is more general than the Java class since the internal
coordinates are floating point and since the user may choose the
closure mode and winding rule.
| Field Summary | |
static String |
ADD_VERTEX
Bound property name to add one vertex. |
static String |
REMOVE_VERTEX
Bound property name to remove one vertex. |
static String |
SET_VERTEX
Bound property name to set one vertex. |
static String |
SET_VERTEX_DATA
Bound property name to set the vertex data. |
| Fields inherited from class edu.neu.ccs.gui.BaseShape |
REMOVE_SHAPE_DATA, SET_CLOSURE_MODE, SET_PATH_STRATEGY, SET_WINDING_RULE, tangent, vertex |
| Constructor Summary | |
PolygonShape()
The default constructor that creates an empty polygon with the following defaults. |
|
PolygonShape(float[][] vertex)
The constructor that creates a polygon with the given vertex array and the following defaults. |
|
PolygonShape(float[][] vertex,
ClosureMode closuremode)
The constructor that creates a polygon with the given vertex array, the given closure mode, and the following default. |
|
PolygonShape(float[][] vertex,
ClosureMode closuremode,
WindingRule windingrule)
The constructor that creates a polygon with the given vertex array, the given closure mode, and the given winding rule. |
|
PolygonShape(float[][] vertex,
WindingRule windingrule)
The constructor that creates a polygon with the given vertex array, the given winding rule, and the following default. |
|
| Method Summary | |
void |
setPathStrategy(Path.Strategy pathstrategy)
Since the Path.Strategy of this class is fixed
to be Path.POLYGON, this method overrides the
inherited method to do nothing. |
| Methods inherited from class edu.neu.ccs.gui.BaseVertexShape |
addVertex, addVertex, addVertices, appendVertex, appendVertex, appendVertices, removeAllVertices, removeVertex, removeVertices, setVertex, setVertex, setVertexData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String SET_VERTEX_DATA
public static final String SET_VERTEX
public static final String ADD_VERTEX
public static final String REMOVE_VERTEX
| Constructor Detail |
public PolygonShape()
The default constructor that creates an empty polygon with the following defaults.
ClosureMode.CLOSEDWindingRule.WIND_NON_ZERO
public PolygonShape(float[][] vertex)
The constructor that creates a polygon with the given vertex array and the following defaults.
ClosureMode.CLOSEDWindingRule.WIND_NON_ZERO
vertex - the vertex data
public PolygonShape(float[][] vertex,
ClosureMode closuremode)
The constructor that creates a polygon with the given vertex array, the given closure mode, and the following default.
WindingRule.WIND_NON_ZERO
vertex - the vertex dataclosuremode - the closure mode
public PolygonShape(float[][] vertex,
WindingRule windingrule)
The constructor that creates a polygon with the given vertex array, the given winding rule, and the following default.
ClosureMode.CLOSED
vertex - the vertex datawindingrule - the winding rule
public PolygonShape(float[][] vertex,
ClosureMode closuremode,
WindingRule windingrule)
The constructor that creates a polygon with the given vertex array, the given closure mode, and the given winding rule.
vertex - the vertex dataclosuremode - the closure modewindingrule - the winding rule| Method Detail |
public final void setPathStrategy(Path.Strategy pathstrategy)
Since the Path.Strategy of this class is fixed
to be Path.POLYGON, this method overrides the
inherited method to do nothing.
setPathStrategy in class BaseShapepathstrategy - the path strategy to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||