org.openjump.util.python.pythonexampleclasses
Class ConstrainedNClickTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
      extended by org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool
          extended by org.openjump.util.python.pythonexampleclasses.ConstrainedNClickTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
Direct Known Subclasses:
DrawCustomTool

public abstract class ConstrainedNClickTool
extends ConstrainedMultiClickTool

Whereas a MultiClickTool looks for a double-click to end the gesture, an NClickTool looks for a certain number of points to end the gesture.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
 
Field Summary
protected  int n
           
 
Fields inherited from class org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool
coordinates, drawClosed, tentativeCoordinate
 
Constructor Summary
ConstrainedNClickTool()
           
 
Method Summary
protected  com.vividsolutions.jts.geom.Coordinate getModelDestination()
           
protected  com.vividsolutions.jts.geom.Coordinate getModelSource()
           
protected  boolean isFinishingRelease(java.awt.event.MouseEvent e)
           
 
Methods inherited from class org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool
activate, add, cancelGesture, deactivate, doConstraint, finishGesture, getCoordinates, getIntersection, getShape, isRightMouseButtonUsed, mouseDragged, mouseLocationChanged, mouseMoved, mousePressed, mouseReleased, toArray
 
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, 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
 

Field Detail

n

protected int n
Constructor Detail

ConstrainedNClickTool

public ConstrainedNClickTool()
Method Detail

getModelSource

protected com.vividsolutions.jts.geom.Coordinate getModelSource()

getModelDestination

protected com.vividsolutions.jts.geom.Coordinate getModelDestination()

isFinishingRelease

protected boolean isFinishingRelease(java.awt.event.MouseEvent e)
Overrides:
isFinishingRelease in class ConstrainedMultiClickTool