Class IndicatorTool
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
-
- All Implemented Interfaces:
KeyListener
,MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
,Tool
- Direct Known Subclasses:
BoxBandTool
,EditVertexTool
,LineBandTool
,MoveTool
public abstract class IndicatorTool extends BasicTool
-
-
Constructor Summary
Constructors Constructor Description IndicatorTool()
IndicatorTool(Cursor cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearIndicator()
protected Shape
getShape()
Gets the shape for displaying the current state of the action.boolean
isIndicatorVisible()
Important for XOR drawing.void
mouseDragged(MouseEvent e)
void
mouseMoved(MouseEvent e)
protected void
redrawIndicator()
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
activate, deactivate, geomModel, getCursor, getGraphics2D, gridSize, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, panel, toModelSnapped, toModelSnappedIfCloseToViewGrid, toModelSnappedToViewGrid
-
-
-
-
Constructor Detail
-
IndicatorTool
public IndicatorTool()
-
IndicatorTool
public IndicatorTool(Cursor cursor)
-
-
Method Detail
-
getShape
protected Shape getShape()
Gets the shape for displaying the current state of the action. Subclasses should override.- Returns:
- null if nothing should be drawn
-
isIndicatorVisible
public boolean isIndicatorVisible()
Important for XOR drawing. Even if #getShape returns null, this method will return true between calls of #redrawShape and #clearShape.
-
clearIndicator
protected void clearIndicator()
-
redrawIndicator
protected void redrawIndicator()
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classBasicTool
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classBasicTool
-
-