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 Cursor
private PrecisionModel
private GeometryEditPanel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(GeometryEditPanel panel) Called when tool is activated.void
protected GeometryEditModel
protected Graphics2D
(package private) double
private Viewport
protected double
gridSize()
void
void
void
void
void
void
void
void
void
void
void
protected GeometryEditPanel
panel()
(package private) double
toModel
(double viewDist) (package private) Point2D
(package private) Coordinate
toModelCoordinate
(Point viewPt) protected Coordinate
protected Coordinate
protected Coordinate
(package private) double
toView
(double distance) (package private) Point2D
toView
(Coordinate modePt)
-
Field Details
-
cursor
-
gridPM
-
panel
-
-
Constructor Details
-
BasicTool
public BasicTool() -
BasicTool
-
-
Method Details
-
getGraphics2D
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseWheelMoved
- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
-
getCursor
-
activate
Called when tool is activated. If subclasses override this method they must call super.activate(). -
deactivate
public void deactivate()- Specified by:
deactivate
in 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()
-