Class LineBandTool
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.LineBandTool
-
- All Implemented Interfaces:
KeyListener
,MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
,Tool
- Direct Known Subclasses:
AbstractDrawTool
,AbstractStreamDrawTool
public abstract class LineBandTool extends IndicatorTool
-
-
Field Summary
Fields Modifier and Type Field Description protected Coordinate
tentativeCoordinate
-
Constructor Summary
Constructors Constructor Description LineBandTool()
LineBandTool(Cursor cursor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
add(Coordinate c)
protected abstract void
bandFinished()
protected void
finishGesture()
List
getCoordinates()
Returns an empty List once the shape is cleared.protected Shape
getShape()
Gets the shape for displaying the current state of the action.protected boolean
isFinishingRelease(MouseEvent e)
Coordinate
lastCoordinate()
void
mouseDragged(MouseEvent e)
protected void
mouseLocationChanged(MouseEvent e)
void
mouseMoved(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
protected void
setClickCountToFinishGesture(int clickCountToFinish)
protected void
setCloseRing(boolean closeRing)
protected void
setDrawBandLines(boolean drawBandLines)
protected Coordinate[]
toArray(List coordinates)
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
clearIndicator, isIndicatorVisible, redrawIndicator
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
activate, deactivate, geomModel, getCursor, getGraphics2D, gridSize, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseWheelMoved, panel, toModelSnapped, toModelSnappedIfCloseToViewGrid, toModelSnappedToViewGrid
-
-
-
-
Field Detail
-
tentativeCoordinate
protected Coordinate tentativeCoordinate
-
-
Constructor Detail
-
LineBandTool
public LineBandTool()
-
LineBandTool
public LineBandTool(Cursor cursor)
-
-
Method Detail
-
setCloseRing
protected void setCloseRing(boolean closeRing)
-
setClickCountToFinishGesture
protected void setClickCountToFinishGesture(int clickCountToFinish)
-
setDrawBandLines
protected void setDrawBandLines(boolean drawBandLines)
-
getCoordinates
public List getCoordinates()
Returns an empty List once the shape is cleared.- See Also:
IndicatorTool.clearShape(java.awt.Graphics2D)
-
lastCoordinate
public Coordinate lastCoordinate()
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classBasicTool
-
mouseLocationChanged
protected void mouseLocationChanged(MouseEvent e)
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classIndicatorTool
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classIndicatorTool
-
add
protected void add(Coordinate c)
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classBasicTool
-
getShape
protected 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
-
isFinishingRelease
protected boolean isFinishingRelease(MouseEvent e)
-
toArray
protected Coordinate[] toArray(List coordinates)
-
-