Class DrawCustomTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool
org.openjump.util.python.pythonexampleclasses.ConstrainedNClickTool
org.openjump.util.python.pythonexampleclasses.DrawCustomTool
- All Implemented Interfaces:
CursorTool, MouseListener, MouseMotionListener, EventListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassstatic interfacestatic interfacestatic interfaceNested classes/interfaces inherited from class AbstractCursorTool
AbstractCursorTool.Listener -
Field Summary
Fields inherited from class ConstrainedNClickTool
nFields inherited from class ConstrainedMultiClickTool
coordinates, drawClosed, mouseLastLoc, tentativeCoordinateFields inherited from class AbstractCursorTool
isLinuxOS, panel -
Constructor Summary
ConstructorsConstructorDescriptionDrawCustomTool(WorkbenchContext context, FeatureDrawingUtil featureDrawingUtil) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(LayerViewPanel layerViewPanel) voidprotected ListfireFeedbackEvent(List coordsIn) protected ListfireFinalGeoEvent(List coordsIn) protected voidprotected org.locationtech.jts.geom.GeometrygetIcon()getName()Returns a very brief description of this CursorTool.protected ShapegetShape()voidvoidvoidvoidvoidsetFireClicks(int fireClicks) voidsetGeometryType(String geoType) voidvoidsetMaxClicks(int maxClicks) voidsetMinClicks(int minClicks) voidsetStrokeWidth(int width) voidsetToolName(String toolName) Methods inherited from class ConstrainedNClickTool
getModelDestination, getModelSource, isFinishingReleaseMethods inherited from class ConstrainedMultiClickTool
add, cancelGesture, doConstraint, finishGesture, getCoordinates, getIntersection, mouseDragged, mouseLocationChanged, mouseMoved, mousePressed, mouseReleased, toArrayMethods inherited from class AbstractCursorTool
add, allowSnapping, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, getColor, getCursor, getImage, getImagePosition, 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
-
Constructor Details
-
DrawCustomTool
-
-
Method Details
-
activate
- Specified by:
activatein interfaceCursorTool- Overrides:
activatein classConstrainedMultiClickTool
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceCursorTool- Overrides:
deactivatein classConstrainedMultiClickTool
-
setFireClicks
public void setFireClicks(int fireClicks) -
setMinClicks
public void setMinClicks(int minClicks) -
setMaxClicks
public void setMaxClicks(int maxClicks) -
setIcon
-
setToolName
-
setGeometryType
-
setStrokeWidth
public void setStrokeWidth(int width) -
setFeedbackListener
-
setFinalGeoListener
-
setActivationListener
-
setDeActivationListener
-
getName
Description copied from interface:CursorToolReturns a very brief description of this CursorTool.- Specified by:
getNamein interfaceCursorTool- Overrides:
getNamein classAbstractCursorTool- Returns:
- the name of this CursorTool
-
getIcon
- Returns:
- null to use a default icon
-
gestureFinished
- Specified by:
gestureFinishedin classAbstractCursorTool- Throws:
Exception
-
getShape
- Overrides:
getShapein classConstrainedMultiClickTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
getFinalGeometry
protected org.locationtech.jts.geom.Geometry getFinalGeometry() throws NoninvertibleTransformException- Throws:
NoninvertibleTransformException
-
fireFeedbackEvent
-
fireFinalGeoEvent
-