Class BasicTool
java.lang.Object
org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
- All Implemented Interfaces:
KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,EventListener,Tool
- Direct Known Subclasses:
IndicatorTool,InfoTool,PanTool,ZoomTool
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Cursorprivate PrecisionModelprivate GeometryEditPanel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(GeometryEditPanel panel) Called when tool is activated.voidprotected GeometryEditModelprotected Graphics2D(package private) doubleprivate Viewportprotected doublegridSize()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprotected GeometryEditPanelpanel()(package private) doubletoModel(double viewDist) (package private) Point2D(package private) CoordinatetoModelCoordinate(Point viewPt) protected Coordinateprotected Coordinateprotected Coordinate(package private) doubletoView(double distance) (package private) Point2DtoView(Coordinate modePt)
-
Field Details
-
cursor
-
gridPM
-
panel
-
-
Constructor Details
-
BasicTool
public BasicTool() -
BasicTool
-
-
Method Details
-
getGraphics2D
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseWheelMoved
- Specified by:
mouseWheelMovedin interfaceMouseWheelListener
-
getCursor
-
activate
Called when tool is activated. If subclasses override this method they must call super.activate(). -
deactivate
public void deactivate()- Specified by:
deactivatein interfaceTool
-
panel
-
geomModel
-
getViewport
-
toView
-
toView
double toView(double distance) -
toModel
-
toModelCoordinate
-
toModel
double toModel(double viewDist) -
getModelSnapTolerance
double getModelSnapTolerance() -
toModelSnapped
-
toModelSnappedToViewGrid
-
toModelSnappedIfCloseToViewGrid
-
gridSize
protected double gridSize()
-