Class SnapIndicatorTool
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
-
- org.locationtech.jts.jump.workbench.ui.snap.SnapIndicatorTool
-
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,EventListener
,CursorTool
public class SnapIndicatorTool extends AbstractCursorTool
Visually indicates the snap point with a coloured dot.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Constructor Summary
Constructors Constructor Description SnapIndicatorTool(Color snappedColor, Color unsnappedColor, double diameter, Collection snapPolicies)
SnapIndicatorTool(Collection snapPolicies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
gestureFinished()
Icon
getIcon()
protected Shape
getShape()
boolean
isGestureInProgress()
Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.void
mouseDragged(MouseEvent e)
void
mouseMoved(MouseEvent e)
-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
activate, add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getCursor, getName, getPanel, getSnapManager, getTaskFrame, getWorkbench, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
-
-
-
-
Constructor Detail
-
SnapIndicatorTool
public SnapIndicatorTool(Collection snapPolicies)
-
SnapIndicatorTool
public SnapIndicatorTool(Color snappedColor, Color unsnappedColor, double diameter, Collection snapPolicies)
-
-
Method Detail
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
gestureFinished
protected void gestureFinished() throws Exception
- Specified by:
gestureFinished
in classAbstractCursorTool
- Throws:
Exception
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classAbstractCursorTool
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classAbstractCursorTool
-
getShape
protected Shape getShape() throws NoninvertibleTransformException
- Specified by:
getShape
in classAbstractCursorTool
- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
isGestureInProgress
public boolean isGestureInProgress()
Description copied from class:AbstractCursorTool
Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.- Specified by:
isGestureInProgress
in interfaceCursorTool
- Overrides:
isGestureInProgress
in classAbstractCursorTool
-
-