Package diva.canvas.interactor
Class BoundsGeometry.BoundsSite
- java.lang.Object
-
- diva.canvas.AbstractSite
-
- diva.canvas.interactor.BoundsGeometry.BoundsSite
-
- All Implemented Interfaces:
Site
- Enclosing class:
- BoundsGeometry
public class BoundsGeometry.BoundsSite extends AbstractSite
BoundsSite is the local class that implements editable sites of Rectangle objects.
-
-
Field Summary
-
Fields inherited from class diva.canvas.AbstractSite
_hasNormal, _normal
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FiguregetFigure()Get the figure to which this site is attached, or null if it is not attached to a figure.intgetID()Get the ID of this site.doublegetNormal()Get the angle of the normal to this site, in radians between zero and 2pi.java.awt.geom.Point2DgetPoint()Get the point location of the site.doublegetX()Get the x-coordinate of the site, in the local coordinates of the containing pane.doublegetY()Get the y-coordinate of the site, in the local coordinates of the containing pane.booleanhasNormal()Test if this site has a "normal" to it.booleanisNormal(int direction)Test if this site has a normal in the given direction.voidsetPoint(java.awt.geom.Point2D point)Set the point location of the sitevoidtranslate(double x, double y)Translate the site by the indicated distance, where distances are in the local coordinates of the containing pane.-
Methods inherited from class diva.canvas.AbstractSite
getPoint, getPoint, getPoint, getTransformContext, setNormal
-
-
-
-
Method Detail
-
getID
public int getID()
Get the ID of this site.- Specified by:
getIDin interfaceSite- Specified by:
getIDin classAbstractSite- Returns:
- The unique identifier.
-
getFigure
public Figure getFigure()
Get the figure to which this site is attached, or null if it is not attached to a figure.- Specified by:
getFigurein interfaceSite- Specified by:
getFigurein classAbstractSite- Returns:
- The figure.
-
getNormal
public double getNormal()
Get the angle of the normal to this site, in radians between zero and 2pi.- Specified by:
getNormalin interfaceSite- Overrides:
getNormalin classAbstractSite- Returns:
- The normal.
-
getPoint
public java.awt.geom.Point2D getPoint()
Get the point location of the site.- Specified by:
getPointin interfaceSite- Overrides:
getPointin classAbstractSite- Returns:
- The point.
-
getX
public double getX()
Get the x-coordinate of the site, in the local coordinates of the containing pane.- Specified by:
getXin interfaceSite- Specified by:
getXin classAbstractSite- Returns:
- The x-coordinate of the site.
-
getY
public double getY()
Get the y-coordinate of the site, in the local coordinates of the containing pane.- Specified by:
getYin interfaceSite- Specified by:
getYin classAbstractSite- Returns:
- The y-coordinate of the site.
-
hasNormal
public boolean hasNormal()
Test if this site has a "normal" to it. Returns true.- Specified by:
hasNormalin interfaceSite- Overrides:
hasNormalin classAbstractSite- Returns:
- true if the site has a normal.
-
isNormal
public boolean isNormal(int direction)
Test if this site has a normal in the given direction.- Specified by:
isNormalin interfaceSite- Overrides:
isNormalin classAbstractSite- Parameters:
direction- The direction- Returns:
- true if the site is normal in the given direction.
-
translate
public void translate(double x, double y)Translate the site by the indicated distance, where distances are in the local coordinates of the containing pane.- Specified by:
translatein interfaceSite- Overrides:
translatein classAbstractSite- Parameters:
x- The x distance to be translated.y- The y distance to be translated.
-
setPoint
public void setPoint(java.awt.geom.Point2D point)
Set the point location of the site
-
-