Class AbstractCursorTool

    • Constructor Detail

      • AbstractCursorTool

        public AbstractCursorTool()
    • Method Detail

      • allowSnapping

        public void allowSnapping()
        Makes this CursorTool obey the snapping settings in the Options dialog.
      • wasShiftPressed

        protected boolean wasShiftPressed()
      • wasControlPressed

        protected boolean wasControlPressed()
      • createCursor

        public static Cursor createCursor​(Image image)
        The cursor will look best if the image is a 32 x 32 transparent GIF.
      • createCursor

        public static Cursor createCursor​(Image image,
                                          Point hotSpot)
      • isGestureInProgress

        public boolean isGestureInProgress()
        Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.
        Specified by:
        isGestureInProgress in interface CursorTool
      • isRightMouseButtonUsed

        public boolean isRightMouseButtonUsed()
        Specified by:
        isRightMouseButtonUsed in interface CursorTool
        Returns:
        true if this CursorTool uses the right mouse button; false to allow the panel to show a popup-menu on right-clicks
      • isShapeOnScreen

        public boolean isShapeOnScreen()
        Important for XOR drawing. Even if #getShape returns null, this method will return true between calls of #redrawShape and #clearShape.
      • createStandardSnappingPolicies

        public static List createStandardSnappingPolicies​(Blackboard blackboard)
      • isRollingBackInvalidEdits

        protected boolean isRollingBackInvalidEdits()
      • setColor

        public void setColor​(Color color)
      • setFilling

        protected void setFilling​(boolean filling)
      • setStrokeWidth

        protected void setStrokeWidth​(int strokeWidth)
        Deprecated.
        Use #setStroke instead.
      • setStroke

        protected void setStroke​(Stroke stroke)
      • setup

        protected void setup​(Graphics2D graphics)
      • getShape

        protected abstract Shape getShape()
                                   throws Exception
        Returns:
        null if nothing should be drawn
        Throws:
        Exception
      • cleanup

        protected void cleanup​(Graphics2D graphics)
      • clearShape

        protected void clearShape()
      • cancelGesture

        public void cancelGesture()
        Description copied from interface: CursorTool
        Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.
        Specified by:
        cancelGesture in interface CursorTool
      • drawShapeXOR

        protected void drawShapeXOR​(Shape shape,
                                    Graphics2D graphics)
      • snap

        protected org.locationtech.jts.geom.Coordinate snap​(org.locationtech.jts.geom.Coordinate modelCoordinate)
      • getTaskFrame

        protected TaskFrame getTaskFrame()
        Returns:
        null if the LayerViewPanel is not inside a TaskFrame
      • gestureFinished

        protected abstract void gestureFinished()
                                         throws Exception
        Throws:
        Exception
      • fireGestureFinished

        protected void fireGestureFinished()
                                    throws Exception
        Throws:
        Exception
      • execute

        protected void execute​(UndoableCommand command)
        Optional means of execution, with undoability.
      • reportNothingToUndoYet

        protected void reportNothingToUndoYet()
        Notifies the UndoManager that this PlugIn did not modify any model states, and therefore the undo history should remain unchanged. Call this method inside #execute(PlugInContext).
      • getName

        public String getName()
        Description copied from interface: CursorTool
        Returns a very brief description of this CursorTool.
        Specified by:
        getName in interface CursorTool
        Returns:
        the name of this CursorTool
      • check

        protected boolean check​(EnableCheck check)
      • getColor

        public Color getColor()