org.openjump.util.python.pythonexampleclasses
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, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
public class DrawCustomTool
- extends ConstrainedNClickTool
| Methods inherited from class org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMultiClickTool |
add, cancelGesture, doConstraint, finishGesture, getCoordinates, getIntersection, 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, getColor, getCursor, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, 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 |
DrawCustomTool
public DrawCustomTool(FeatureDrawingUtil featureDrawingUtil)
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate in interface CursorTool- Overrides:
activate in class ConstrainedMultiClickTool
deactivate
public void deactivate()
- Specified by:
deactivate in interface CursorTool- Overrides:
deactivate in class ConstrainedMultiClickTool
setFireClicks
public void setFireClicks(int fireClicks)
setMinClicks
public void setMinClicks(int minClicks)
setMaxClicks
public void setMaxClicks(int maxClicks)
setIcon
public void setIcon(javax.swing.Icon icon)
setToolName
public void setToolName(java.lang.String toolName)
setGeometryType
public void setGeometryType(java.lang.String geoType)
setStrokeWidth
public void setStrokeWidth(int width)
- Overrides:
setStrokeWidth in class AbstractCursorTool
setFeedbackListener
public void setFeedbackListener(DrawCustomTool.FeedbackListener listener)
setFinalGeoListener
public void setFinalGeoListener(DrawCustomTool.FinalDrawListener listener)
setActivationListener
public void setActivationListener(DrawCustomTool.ActivationListener listener)
setDeActivationListener
public void setDeActivationListener(DrawCustomTool.DeActivationListener listener)
getName
public java.lang.String getName()
- Description copied from interface:
CursorTool
- Returns a very brief description of this CursorTool.
- Specified by:
getName in interface CursorTool- Overrides:
getName in class AbstractCursorTool
- Returns:
- the name of this CursorTool
getIcon
public javax.swing.Icon getIcon()
- Returns:
- null to use a default icon
gestureFinished
protected void gestureFinished()
throws java.lang.Exception
- Specified by:
gestureFinished in class AbstractCursorTool
- Throws:
java.lang.Exception
getShape
protected java.awt.Shape getShape()
throws java.awt.geom.NoninvertibleTransformException
- Overrides:
getShape in class ConstrainedMultiClickTool
- Returns:
- null if nothing should be drawn
- Throws:
java.awt.geom.NoninvertibleTransformException
getFinalGeometry
protected com.vividsolutions.jts.geom.Geometry getFinalGeometry()
throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
fireFeedbackEvent
protected java.util.List fireFeedbackEvent(java.util.List coordsIn)
fireFinalGeoEvent
protected java.util.List fireFinalGeoEvent(java.util.List coordsIn)