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
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 com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Field Summary
Fields Modifier and Type Field Description protected PointmouseLastLoc-
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
isLinuxOS, panel
-
-
Constructor Summary
Constructors Constructor Description MultiClickTool(WorkbenchContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(LayerViewPanel new_panel)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.voiddeactivate()protected voidfinishGesture()List<org.locationtech.jts.geom.Coordinate>getCoordinates()Will return an empty List once the shape is cleared.protected CoordinateListMetricsgetMetrics()protected ShapegetShape()protected booleanisFinishingRelease(MouseEvent e)voidmouseDragged(MouseEvent e)protected voidmouseLocationChanged(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)protected voidsetCloseRing(boolean closeRing)protected voidsetMetricsDisplay(CoordinateListMetrics metrics)protected org.locationtech.jts.geom.Coordinate[]toArray(List<org.locationtech.jts.geom.Coordinate> coordinates)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.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, wasShiftPressed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vividsolutions.jump.workbench.ui.cursortool.CursorTool
getIcon
-
-
-
-
Field Detail
-
mouseLastLoc
protected Point mouseLastLoc
-
-
Constructor Detail
-
MultiClickTool
public MultiClickTool(WorkbenchContext context)
-
-
Method Detail
-
setMetricsDisplay
protected void setMetricsDisplay(CoordinateListMetrics metrics)
-
getMetrics
protected CoordinateListMetrics getMetrics()
-
setCloseRing
protected void setCloseRing(boolean closeRing)
-
getCoordinates
public List<org.locationtech.jts.geom.Coordinate> getCoordinates()
Will return an empty List once the shape is cleared.- Returns:
- a list of clicked coordinates
- 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<org.locationtech.jts.geom.Coordinate> coordinates)
-
deactivate
public void deactivate()
- Specified by:
deactivatein interfaceCursorTool- Overrides:
deactivatein classAbstractCursorTool
-
activate
public void activate(LayerViewPanel new_panel)
- Specified by:
activatein interfaceCursorTool- Overrides:
activatein classAbstractCursorTool
-
-