Class LineSegmentTool

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class LineSegmentTool
    extends Tool
    This class handles creation of lines.
    • Constructor Detail

      • LineSegmentTool

        public LineSegmentTool()
    • Method Detail

      • getShapeClass

        public java.lang.Class getShapeClass()
        Returns the shape class that this tool is responsible for.
        Overrides:
        getShapeClass in class Tool
      • getWindowTitle

        public java.lang.String getWindowTitle()
        Returns the name of this tool to be displayed by inspector.
        Overrides:
        getWindowTitle in class Tool
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent anEvent)
        Event handling - overridden to install crosshair cursor.
        Overrides:
        mouseMoved in class Tool
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent anEvent)
        Handles mouse press for line creation.
        Overrides:
        mousePressed in class Tool
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent anEvent)
        Handles mouse drag for line creation.
        Overrides:
        mouseDragged in class Tool
      • getHandleCount

        public int getHandleCount​(RMShape aShape)
        Editor method (returns the number of handles).
        Overrides:
        getHandleCount in class Tool
      • getHandlePoint

        public RMPoint getHandlePoint​(RMShape aShape,
                                      int anIndex,
                                      boolean isSuperSelected)
        Editor method.
        Overrides:
        getHandlePoint in class Tool