Class 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.
    • Method Detail

      • getX

        public double getX()
        Get the x-coordinate of the site, in the local coordinates of the containing pane
        Specified by:
        getX in interface Site
        Overrides:
        getX in class PathGeometry.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:
        getY in interface Site
        Overrides:
        getY in class PathGeometry.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:
        setPoint in class PathGeometry.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:
        translate in interface Site
        Overrides:
        translate in class PathGeometry.Vertex
        Parameters:
        x - The x distance to be translated.
        y - The y distance to be translated.