com.vividsolutions.jump.workbench.ui.cursortool
Class MultiClickTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool
- All Implemented Interfaces:
- CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
- Direct Known Subclasses:
- DrawLineStringTool, MeasureM_FTool, 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.
| Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool |
add, allowSnapping, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, 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 com.vividsolutions.jump.workbench.ui.cursortool.CursorTool |
getIcon |
MultiClickTool
public MultiClickTool()
setMetricsDisplay
protected void setMetricsDisplay(CoordinateListMetrics metrics)
getMetrics
protected CoordinateListMetrics getMetrics()
setCloseRing
protected void setCloseRing(boolean closeRing)
getCoordinates
public java.util.List getCoordinates()
- Will return an empty List once the shape is cleared.
- See Also:
AbstractCursorTool.clearShape()
cancelGesture
public void cancelGesture()
- Description copied from interface:
CursorTool
- Notifies the CursorTool that a party is requesting that the gesture
currently in progress be aborted.
- Specified by:
cancelGesture in interface CursorTool- Overrides:
cancelGesture in class AbstractCursorTool
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased in interface java.awt.event.MouseListener- Overrides:
mouseReleased in class AbstractCursorTool
mouseLocationChanged
protected void mouseLocationChanged(java.awt.event.MouseEvent e)
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener- Overrides:
mouseMoved in class AbstractCursorTool
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener- Overrides:
mouseDragged in class AbstractCursorTool
add
protected void add(com.vividsolutions.jts.geom.Coordinate c)
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed in interface java.awt.event.MouseListener- Overrides:
mousePressed in class AbstractCursorTool
getShape
protected java.awt.Shape getShape()
throws java.awt.geom.NoninvertibleTransformException
- Specified by:
getShape in class AbstractCursorTool
- Returns:
- null if nothing should be drawn
- Throws:
java.awt.geom.NoninvertibleTransformException
isFinishingRelease
protected boolean isFinishingRelease(java.awt.event.MouseEvent e)
toArray
protected com.vividsolutions.jts.geom.Coordinate[] toArray(java.util.List coordinates)
finishGesture
protected void finishGesture()
throws java.lang.Exception
- Throws:
java.lang.Exception
deactivate
public void deactivate()
- Specified by:
deactivate in interface CursorTool- Overrides:
deactivate in class AbstractCursorTool
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate in interface CursorTool- Overrides:
activate in class AbstractCursorTool