|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.BoundsGeometry
public class BoundsGeometry
BoundsGeometry is a class that provides support for manipulating the bounds of a figure.
Nested Class Summary | |
---|---|
class |
BoundsGeometry.BoundsSite
BoundsSite is the local class that implements editable sites of Rectangle objects. |
Field Summary | |
---|---|
private double |
_minSize
The minimum size of the rectangle |
private Figure |
_parentFigure
The figure to which the sites are attached |
private java.awt.geom.Rectangle2D |
_rect
The defining rectangle |
private static int |
_siteCount
The number of sites in the sites array. |
private BoundsGeometry.BoundsSite[] |
_sites
The sites that exist so far |
private double |
_xOvershoot
The overshoot of the x and y coordinates |
private double |
_yOvershoot
|
Constructor Summary | |
---|---|
BoundsGeometry(Figure figure,
java.awt.geom.Rectangle2D bounds)
Create a new geometry object on the given figure and with the given initial bounds. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the current rectangle that defines this geometry. |
Site |
getE()
Get the east site. |
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. |
Site |
getNE()
Get the north-east site. |
Site |
getNW()
Get the north-west site. |
Site |
getS()
Get the south site. |
Site |
getSE()
Get the south-east site. |
java.awt.Shape |
getShape()
Get the current shape that defines this geometry |
Site |
getSite(int id)
Get the single site with the given ID. |
Site |
getSW()
Get the south-west site. |
Site |
getW()
Get the west site. |
void |
setBounds(java.awt.geom.Rectangle2D rect)
Set the rectangle that defines this geometry object. |
void |
setMinimumSize(double minimumSize)
Set the minimum size of the rectangle. |
void |
setShape(java.awt.Shape shape)
Set the shape that defines this geometry object. |
java.util.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 |
Field Detail |
---|
private Figure _parentFigure
private double _minSize
private double _xOvershoot
private double _yOvershoot
private java.awt.geom.Rectangle2D _rect
private static int _siteCount
private BoundsGeometry.BoundsSite[] _sites
Constructor Detail |
---|
public BoundsGeometry(Figure figure, java.awt.geom.Rectangle2D bounds)
Method Detail |
---|
public Site getSite(int id)
public double getMinimumSize()
public Site getNE()
public Site getNW()
public Site getSE()
public Site getSW()
public Site getN()
public Site getS()
public Site getE()
public Site getW()
public Figure getFigure()
getFigure
in interface Geometry
public java.awt.Shape getShape()
getShape
in interface Geometry
public java.awt.geom.Rectangle2D getBounds()
public void setMinimumSize(double minimumSize)
public void setShape(java.awt.Shape shape)
setShape
in interface Geometry
public void setBounds(java.awt.geom.Rectangle2D rect)
public java.util.Iterator sites()
public void translate(double x, double y)
translate
in interface Geometry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |