Package diva.canvas.interactor
Class PathGeometry.CloseSegment
- java.lang.Object
-
- diva.canvas.AbstractSite
-
- diva.canvas.interactor.PathGeometry.Vertex
-
- diva.canvas.interactor.PathGeometry.CloseSegment
-
- All Implemented Interfaces:
Site
- Enclosing class:
- PathGeometry
public class PathGeometry.CloseSegment extends PathGeometry.Vertex
CloseSegment is a special type of Vertex, that closes a sub-path. CloseSegments will be returned in the iterators over vertices, but clients must be aware of this, and not (for example) create grab-handles on them. The coordinates returned by a CloseSegment will be the coordinates of the first vertex in that subpath, but generally this should not be used as it is inefficient.
-
-
Field Summary
-
Fields inherited from class diva.canvas.AbstractSite
_hasNormal, _normal
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetX()Get the x-coordinate of the site, in the local coordinates of the containing panedoublegetY()Get the y-coordinate of the site, in the local coordinates of the containing pane.voidsetPoint(java.awt.geom.Point2D point)Set the point location of the sitevoidtranslate(double x, double y)Translate the site by the indicated distance.-
Methods inherited from class diva.canvas.interactor.PathGeometry.Vertex
getControlPoint, getFigure, getID, toString
-
Methods inherited from class diva.canvas.AbstractSite
getNormal, getPoint, getPoint, getPoint, getPoint, getTransformContext, hasNormal, isNormal, setNormal
-
-
-
-
Method Detail
-
getX
public double getX()
Get the x-coordinate of the site, in the local coordinates of the containing pane- Specified by:
getXin interfaceSite- Overrides:
getXin classPathGeometry.Vertex- 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- Overrides:
getYin classPathGeometry.Vertex- Returns:
- The y-coordinate of the site.
-
setPoint
public void setPoint(java.awt.geom.Point2D point)
Set the point location of the site- Overrides:
setPointin classPathGeometry.Vertex
-
translate
public void translate(double x, double y)Translate the site by the indicated distance. This is an illegal operation for close segments and throws an exception.- Specified by:
translatein interfaceSite- Overrides:
translatein classPathGeometry.Vertex- Parameters:
x- The x distance to be translated.y- The y distance to be translated.
-
-