Class LineSegmentTool

All Implemented Interfaces:
RMArchiver.Archiving, Cloneable

public class LineSegmentTool extends Tool
This class handles creation of lines.
  • Field Details

  • Constructor Details

    • LineSegmentTool

      public LineSegmentTool()
  • Method Details

    • getShapeClass

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

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

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

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

      public void mouseDragged(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
    • moveShapeHandle

      public void moveShapeHandle(RMShape aShape, int aHandle, RMPoint aPoint)
      Editor method.
      Overrides:
      moveShapeHandle in class Tool