Class MultiClickTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool
- All Implemented Interfaces:
CursorTool, MouseListener, MouseMotionListener, EventListener
- Direct Known Subclasses:
CutFeaturesTool, DrawLineStringTool, MeasureM_FTool, MeasureTool, NClickTool, PolygonTool, ProfileGraphTool, RemodelerTool
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 AbstractCursorTool
AbstractCursorTool.Listener -
Field Summary
FieldsFields inherited from class AbstractCursorTool
isLinuxOS, panel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(LayerViewPanel new_panel) protected voidadd(org.locationtech.jts.geom.Coordinate c) voidNotifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.voidprotected voidList<org.locationtech.jts.geom.Coordinate> Will return an empty List once the shape is cleared.protected CoordinateListMetricsprotected ShapegetShape()protected booleanvoidprotected voidvoidvoidvoidprotected voidsetCloseRing(boolean closeRing) protected voidsetMetricsDisplay(CoordinateListMetrics metrics) protected org.locationtech.jts.geom.Coordinate[]Methods inherited from class AbstractCursorTool
add, allowSnapping, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, gestureFinished, getColor, getCursor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getStroke, getTaskFrame, getWorkbench, getWorkbenchContext, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setControlPressed, setFilling, setPanel, setShiftPressed, setStroke, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CursorTool
getIcon
-
Field Details
-
mouseLastLoc
-
-
Constructor Details
-
MultiClickTool
-
-
Method Details
-
setMetricsDisplay
-
getMetrics
-
setCloseRing
protected void setCloseRing(boolean closeRing) -
getCoordinates
Will return an empty List once the shape is cleared.- Returns:
- a list of clicked coordinates
- See Also:
-
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
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classAbstractCursorTool
-
mouseLocationChanged
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classAbstractCursorTool
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classAbstractCursorTool
-
add
protected void add(org.locationtech.jts.geom.Coordinate c) -
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classAbstractCursorTool
-
getShape
- Specified by:
getShapein classAbstractCursorTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
isFinishingRelease
-
toArray
protected org.locationtech.jts.geom.Coordinate[] toArray(List<org.locationtech.jts.geom.Coordinate> coordinates) -
finishGesture
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceCursorTool- Overrides:
deactivatein classAbstractCursorTool
-
activate
- Specified by:
activatein interfaceCursorTool- Overrides:
activatein classAbstractCursorTool
-