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.CoordinatemodelDestinationModify 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 voidactivate(LayerViewPanel layerViewPanel)protected booleancheckCircle(org.locationtech.jts.geom.Geometry circle)static CursorToolcreate(WorkbenchContext context)protected voidgestureFinished()eventsCursorgetCursor()IcongetIcon()StringgetName()Returns a very brief description of this CursorTool.protected ShapegetShape()changed to get circle around mouse pointerbooleanmakeDialogThings(LayerViewPanel panel)voidmouseMoved(MouseEvent e)overwritten super method to show the circle on any mouse moveprotected voidsetModelDestination(org.locationtech.jts.geom.Coordinate destination)protected voidsetViewDestination(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, 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 Exceptionevents- Specified by:
gestureFinishedin 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:
activatein interfaceCursorTool- Overrides:
activatein classMultiClickTool
-
getCursor
public Cursor getCursor()
- Specified by:
getCursorin interfaceCursorTool- Overrides:
getCursorin classAbstractCursorTool
-
getName
public String 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
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:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classMultiClickTool
-
getShape
protected Shape getShape()
changed to get circle around mouse pointer- Overrides:
getShapein 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)
-
-