Class IndicatorTool
- java.lang.Object
-
- com.vividsolutions.jtstest.testbuilder.ui.tools.BasicTool
-
- com.vividsolutions.jtstest.testbuilder.ui.tools.IndicatorTool
-
- All Implemented Interfaces:
Tool,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.util.EventListener
- Direct Known Subclasses:
BoxBandTool,EditVertexTool,LineBandTool
public abstract class IndicatorTool extends BasicTool
-
-
Constructor Summary
Constructors Constructor Description IndicatorTool()IndicatorTool(java.awt.Cursor cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearIndicator()protected java.awt.ShapegetShape()Gets the shape for displaying the current state of the action.booleanisIndicatorVisible()Important for XOR drawing.voidmouseDragged(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)protected voidredrawIndicator()-
Methods inherited from class com.vividsolutions.jtstest.testbuilder.ui.tools.BasicTool
activate, deactivate, geomModel, getCursor, getGraphics2D, gridSize, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, panel, toModelSnapped, toModelSnappedIfCloseToViewGrid, toModelSnappedToViewGrid
-
-
-
-
Method Detail
-
getShape
protected java.awt.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(java.awt.event.MouseEvent e)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classBasicTool
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseMovedin classBasicTool
-
-