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 voidgestureFinished()IcongetIcon()protected ShapegetShape()booleanisGestureInProgress()Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.voidmouseDragged(MouseEvent e)voidmouseMoved(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:
gestureFinishedin classAbstractCursorTool- Throws:
Exception
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classAbstractCursorTool
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classAbstractCursorTool
-
getShape
protected Shape getShape() throws NoninvertibleTransformException
- Specified by:
getShapein classAbstractCursorTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
isGestureInProgress
public boolean isGestureInProgress()
Description copied from class:AbstractCursorToolUsed by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.- Specified by:
isGestureInProgressin interfaceCursorTool- Overrides:
isGestureInProgressin classAbstractCursorTool
-
-