|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.CircleGeometry
public class CircleGeometry
A class that provides support for manipulating the bounds of a figure. Because this geometry only provides one site at the bounds of the figure, and transforms the bounds equally in all directions, it makes sense to only use this Geometry type for figures containing circular shapes or otherwise highly-symmetric shapes.
Nested Class Summary | |
---|---|
class |
CircleGeometry.CircleSite
CircleSite is the local class that implements an editable site of Rectangle objects. |
Constructor Summary | |
---|---|
CircleGeometry(Figure figure,
Rectangle2D bounds)
Create a new geometry object on the given figure and with the given initial bounds. |
Method Summary | |
---|---|
Rectangle2D |
getBounds()
Get the current rectangle that defines this geometry. |
Figure |
getFigure()
Get the figure to which this geometry object is attached. |
double |
getMinimumSize()
Get the minimum size of the rectangle. |
Site |
getN()
Get the north site (only site). |
Shape |
getShape()
Get the current shape that defines this geometry |
Site |
getSite(int id)
Get the single site with the given ID. |
void |
setBounds(Rectangle2D rect)
Set the rectangle that defines this geometry object. |
void |
setMinimumSize(double minimumSize)
Set the minimum size of the rectangle. |
void |
setShape(Shape shape)
Set the shape that defines this geometry object. |
Iterator |
sites()
Return an iteration over the sites in this geometry object. |
void |
translate(double x,
double y)
Translate the geometry object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CircleGeometry(Figure figure, Rectangle2D bounds)
Method Detail |
---|
public Site getSite(int id)
public double getMinimumSize()
public Site getN()
public Figure getFigure()
getFigure
in interface Geometry
public Shape getShape()
getShape
in interface Geometry
public Rectangle2D getBounds()
public void setMinimumSize(double minimumSize)
public void setShape(Shape shape)
setShape
in interface Geometry
public void setBounds(Rectangle2D rect)
public Iterator sites()
public void translate(double x, double y)
translate
in interface Geometry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |