|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.PathGeometry
public class PathGeometry
PathGeometry represents a path. Actually, any shape. Its defining shape is any instance of Shape, although generally this class is most useful for shapes that are instances of GeneralPath, since any modification to any of the will cause the shape returned by getShape() to be changed into an instance of GeneralPath.
PathGeometry provides sites for the vertices of the path, and for the control point for those segments that are quadratic or cubic curves.
Nested Class Summary | |
---|---|
class |
PathGeometry.CloseSegment
CloseSegment is a special type of Vertex, that closes a sub-path. |
class |
PathGeometry.Vertex
Vertex is the site that represents vertexes of the path. |
Constructor Summary | |
---|---|
PathGeometry(Figure figure,
Shape shape)
Create a new geometry object on the given figure and with the given initial shape. |
Method Summary | |
---|---|
Figure |
getFigure()
Get the figure to which this geometry object is attached. |
Shape |
getShape()
Get the shape that defines this geometry object. |
Site |
getVertex(int number)
Get the site on the given vertex. |
int |
getVertexCount()
Get the number of vertices of this shape. |
void |
setShape(Shape shape)
Set the shape that defines this geometry object. |
void |
translate(double x,
double y)
Translate the geometry object |
Iterator |
vertices()
Return an iteration over the vertices in this geometry object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathGeometry(Figure figure, Shape shape)
Method Detail |
---|
public Figure getFigure()
getFigure
in interface Geometry
public Shape getShape()
getShape
in interface Geometry
public Site getVertex(int number)
public int getVertexCount()
public void setShape(Shape shape)
setShape
in interface Geometry
public void translate(double x, double y)
translate
in interface Geometry
public Iterator vertices()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |