Class MultiClickTool
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
-
- org.locationtech.jts.jump.workbench.ui.cursortool.MultiClickTool
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener,CursorTool
- Direct Known Subclasses:
DrawLineStringTool,MeasureTool,NClickTool,PolygonTool
public abstract class MultiClickTool extends AbstractCursorTool
A VisualIndicatorTool that allows the user to draw shapes with multiple vertices. Double-clicking ends the gesture.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Constructor Summary
Constructors Constructor Description MultiClickTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(org.locationtech.jts.geom.Coordinate c)voidcancelGesture()Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.protected voidfinishGesture()ListgetCoordinates()Will return an empty List once the shape is cleared.protected ShapegetShape()protected booleanisFinishingRelease(MouseEvent e)voidmouseDragged(MouseEvent e)protected voidmouseLocationChanged(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)protected org.locationtech.jts.geom.Coordinate[]toArray(List coordinates)-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
activate, add, allowSnapping, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, gestureFinished, getColor, getCursor, getName, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.locationtech.jts.jump.workbench.ui.cursortool.CursorTool
getIcon
-
-
-
-
Method Detail
-
getCoordinates
public List getCoordinates()
Will return an empty List once the shape is cleared.- See Also:
AbstractCursorTool.clearShape()
-
cancelGesture
public void cancelGesture()
Description copied from interface:CursorToolNotifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.- Specified by:
cancelGesturein interfaceCursorTool- Overrides:
cancelGesturein classAbstractCursorTool
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classAbstractCursorTool
-
mouseLocationChanged
protected void mouseLocationChanged(MouseEvent e)
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classAbstractCursorTool
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classAbstractCursorTool
-
add
protected void add(org.locationtech.jts.geom.Coordinate c)
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classAbstractCursorTool
-
getShape
protected Shape getShape() throws NoninvertibleTransformException
- Specified by:
getShapein classAbstractCursorTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
isFinishingRelease
protected boolean isFinishingRelease(MouseEvent e)
-
toArray
protected org.locationtech.jts.geom.Coordinate[] toArray(List coordinates)
-
-