Class RMStarShapeTool<T extends RMStarShape>


  • public class RMStarShapeTool<T extends RMStarShape>
    extends RMTool<T>
    Tool for start shape.
    • Constructor Detail

      • RMStarShapeTool

        public RMStarShapeTool()
      • RMStarShapeTool

        public RMStarShapeTool​(com.google.common.eventbus.EventBus ebus)
    • Method Detail

      • resetUI

        public void resetUI()
        Updates the UI controls from the currently selected star.
        Overrides:
        resetUI in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • respondUI

        public void respondUI​(SwingEvent anEvent)
        Updates the currently selected oval from the UI controls.
        Overrides:
        respondUI in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • getShapeClass

        public java.lang.Class getShapeClass()
        Returns the shape class this tool is responsible for.
        Overrides:
        getShapeClass in class RMTool<T extends RMStarShape>
      • getWindowTitle

        public java.lang.String getWindowTitle()
        Returns the string used for the inspector window title.
        Overrides:
        getWindowTitle in class RMTool<T extends RMStarShape>
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent anEvent)
        Event handling for shape creation.
        Overrides:
        mouseDragged in class RMTool<T extends RMStarShape>
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent anEvent)
        Event handling for shape creation.
        Overrides:
        mousePressed in class RMTool<T extends RMStarShape>
      • getHandleCount

        public int getHandleCount​(T aStarShape)
        Returns the number of handles for this shape.
        Overrides:
        getHandleCount in class RMTool<T extends RMStarShape>
      • getHandlePoint

        public RMPoint getHandlePoint​(T aStarShape,
                                      int aHandle,
                                      boolean isSuperSelected)
        Returns the point for the handle of the given shape at the given handle index in the given shape's coords.
        Overrides:
        getHandlePoint in class RMTool<T extends RMStarShape>
      • moveShapeHandle

        public void moveShapeHandle​(T aShape,
                                    int aHandle,
                                    RMPoint toPoint)
        Moves the handle at the given index to the given point.
        Overrides:
        moveShapeHandle in class RMTool<T extends RMStarShape>
      • getHandleCursor

        public java.awt.Cursor getHandleCursor​(T aShape,
                                               int aHandle)
        Returns the cursor for given handle.
        Overrides:
        getHandleCursor in class RMTool<T extends RMStarShape>
      • resizeStar

        public void resizeStar​(RMStarShape s,
                               RMPoint from,
                               RMPoint to)
        Set the frame of the star based on a center point and one of the vertices.