Class EditVertexTool
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.EditVertexTool
-
- All Implemented Interfaces:
java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.EventListener
,Tool
public class EditVertexTool extends IndicatorTool
- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private Coordinate[]
adjVertices
(package private) Coordinate
currentVertexLoc
private static double
IND_CIRCLE_RADIUS
private static EditVertexTool
instance
private Coordinate
selectedVertexLocation
-
Constructor Summary
Constructors Modifier Constructor Description private
EditVertexTool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Shape
getIndicatorCircle(java.awt.geom.Point2D p)
static EditVertexTool
getInstance()
protected java.awt.Shape
getShape()
Gets the shape for displaying the current state of the action.void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
clearIndicator, isIndicatorVisible, mouseMoved, redrawIndicator
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
activate, deactivate, geomModel, getCursor, getGraphics2D, getModelSnapTolerance, gridSize, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, mouseWheelMoved, panel, toModel, toModel, toModelCoordinate, toModelSnapped, toModelSnappedIfCloseToViewGrid, toModelSnappedToViewGrid, toView, toView
-
-
-
-
Field Detail
-
instance
private static EditVertexTool instance
-
currentVertexLoc
Coordinate currentVertexLoc
-
selectedVertexLocation
private Coordinate selectedVertexLocation
-
adjVertices
private Coordinate[] adjVertices
-
IND_CIRCLE_RADIUS
private static final double IND_CIRCLE_RADIUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static EditVertexTool getInstance()
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classBasicTool
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classBasicTool
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classIndicatorTool
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Overrides:
mouseClicked
in classBasicTool
-
getShape
protected java.awt.Shape getShape()
Description copied from class:IndicatorTool
Gets the shape for displaying the current state of the action. Subclasses should override.- Overrides:
getShape
in classIndicatorTool
- Returns:
- null if nothing should be drawn
-
getIndicatorCircle
protected java.awt.Shape getIndicatorCircle(java.awt.geom.Point2D p)
-
-