Class ConstrainedMultiClickTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool
- All Implemented Interfaces:
CursorTool, MouseListener, MouseMotionListener, EventListener
- Direct Known Subclasses:
ConstrainedMultiClickArcTool, ConstrainedNClickTool, ConstrainedNClickTool, ConstrainedPolygonTool, DrawConstrainedCircleTool, DrawConstrainedLineStringTool
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
FieldsModifier and TypeFieldDescriptionprotected Listprotected booleanprotected Pointprotected org.locationtech.jts.geom.CoordinateFields inherited from class AbstractCursorTool
isLinuxOS, panel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(LayerViewPanel layerViewPanel) 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 org.locationtech.jts.geom.Coordinateprotected voidWill return an empty List once the shape is cleared.protected org.locationtech.jts.geom.CoordinategetIntersection(org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, org.locationtech.jts.geom.Coordinate p3, org.locationtech.jts.geom.Coordinate p4) protected ShapegetShape()protected booleanvoidprotected voidvoidvoidvoidprotected 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
-
coordinates
-
tentativeCoordinate
protected org.locationtech.jts.geom.Coordinate tentativeCoordinate -
drawClosed
protected boolean drawClosed -
mouseLastLoc
-
-
Constructor Details
-
ConstrainedMultiClickTool
-
-
Method Details
-
getCoordinates
-
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
-
doConstraint
protected org.locationtech.jts.geom.Coordinate doConstraint(MouseEvent e) throws NoninvertibleTransformException - Throws:
NoninvertibleTransformException
-
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
-
finishGesture
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceCursorTool- Overrides:
deactivatein classAbstractCursorTool
-
getIntersection
protected org.locationtech.jts.geom.Coordinate getIntersection(org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, org.locationtech.jts.geom.Coordinate p3, org.locationtech.jts.geom.Coordinate p4) -
activate
- Specified by:
activatein interfaceCursorTool- Overrides:
activatein classAbstractCursorTool
-