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
,MouseListener
,MouseMotionListener
,EventListener
public class DrawCircleWithGivenRadiusTool extends NClickTool
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.locationtech.jts.geom.Coordinate
modelDestination
Modify using #setDestination-
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool
mouseLastLoc
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
isLinuxOS, panel
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(LayerViewPanel layerViewPanel)
protected boolean
checkCircle(org.locationtech.jts.geom.Geometry circle)
static CursorTool
create(WorkbenchContext context)
protected void
gestureFinished()
eventsCursor
getCursor()
Icon
getIcon()
String
getName()
Returns a very brief description of this CursorTool.protected Shape
getShape()
changed to get circle around mouse pointerboolean
makeDialogThings(LayerViewPanel panel)
void
mouseMoved(MouseEvent e)
overwritten super method to show the circle on any mouse moveprotected void
setModelDestination(org.locationtech.jts.geom.Coordinate destination)
protected void
setViewDestination(Point2D destination)
-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.NClickTool
getModelDestination, getModelSource, isFinishingRelease, numClicks
-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool
add, cancelGesture, deactivate, 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, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, 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
-
-
-
-
Method Detail
-
create
public static CursorTool create(WorkbenchContext context)
-
gestureFinished
protected void gestureFinished() throws Exception
events- Specified by:
gestureFinished
in classAbstractCursorTool
- Throws:
Exception
-
checkCircle
protected boolean checkCircle(org.locationtech.jts.geom.Geometry circle) throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate
in interfaceCursorTool
- Overrides:
activate
in classMultiClickTool
-
getCursor
public Cursor getCursor()
- Specified by:
getCursor
in interfaceCursorTool
- Overrides:
getCursor
in classAbstractCursorTool
-
getName
public String getName()
Description copied from interface:CursorTool
Returns a very brief description of this CursorTool.- Specified by:
getName
in interfaceCursorTool
- Overrides:
getName
in classAbstractCursorTool
- Returns:
- the name of this CursorTool
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
mouseMoved
public void mouseMoved(MouseEvent e)
overwritten super method to show the circle on any mouse move- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMultiClickTool
-
getShape
protected Shape getShape()
changed to get circle around mouse pointer- Overrides:
getShape
in classMultiClickTool
- Returns:
- null if nothing should be drawn
-
makeDialogThings
public boolean makeDialogThings(LayerViewPanel panel) throws Exception
- Throws:
Exception
-
setViewDestination
protected void setViewDestination(Point2D destination) throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
setModelDestination
protected void setModelDestination(org.locationtech.jts.geom.Coordinate destination)
-
-