org.openjump.core.ui.plugin.edittoolbox.cursortools
Class DrawCircleWithGivenRadiusTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool
com.vividsolutions.jump.workbench.ui.cursortool.NClickTool
org.openjump.core.ui.plugin.edittoolbox.cursortools.DrawCircleWithGivenRadiusTool
- All Implemented Interfaces:
- CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
public class DrawCircleWithGivenRadiusTool
- extends NClickTool
|
Field Summary |
protected com.vividsolutions.jts.geom.Coordinate |
modelDestination
Modify using #setDestination |
| Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool |
add, cancelGesture, finishGesture, getCoordinates, getMetrics, mouseDragged, mouseLocationChanged, mousePressed, mouseReleased, setCloseRing, setMetricsDisplay, 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, 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 |
modelDestination
protected com.vividsolutions.jts.geom.Coordinate modelDestination
- Modify using #setDestination
create
public static CursorTool create(LayerNamePanelProxy layerNamePanelProxy)
gestureFinished
protected void gestureFinished()
throws java.lang.Exception
- events
- Specified by:
gestureFinished in class AbstractCursorTool
- Throws:
java.lang.Exception
checkCircle
protected boolean checkCircle(com.vividsolutions.jts.geom.Geometry circle)
throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate in interface CursorTool- Overrides:
activate in class MultiClickTool
deactivate
public void deactivate()
- Specified by:
deactivate in interface CursorTool- Overrides:
deactivate in class MultiClickTool
getCursor
public java.awt.Cursor getCursor()
- Specified by:
getCursor in interface CursorTool- Overrides:
getCursor in class AbstractCursorTool
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
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- overwritten super method to show the circle on any mouse move
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener- Overrides:
mouseMoved in class MultiClickTool
getShape
protected java.awt.Shape getShape()
- changed to get circle around mouse pointer
- Overrides:
getShape in class MultiClickTool
- Returns:
- null if nothing should be drawn
makeDialogThings
public boolean makeDialogThings(LayerViewPanel panel)
throws java.lang.Exception
- Throws:
java.lang.Exception
setViewDestination
protected void setViewDestination(java.awt.geom.Point2D destination)
throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
setModelDestination
protected void setModelDestination(com.vividsolutions.jts.geom.Coordinate destination)