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 CoordinatetentativeCoordinate
-
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 voidadd(Coordinate c)protected abstract voidbandFinished()protected voidfinishGesture()ListgetCoordinates()Returns an empty List once the shape is cleared.protected ShapegetShape()Gets the shape for displaying the current state of the action.protected booleanisFinishingRelease(MouseEvent e)CoordinatelastCoordinate()voidmouseDragged(MouseEvent e)protected voidmouseLocationChanged(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)protected voidsetClickCountToFinishGesture(int clickCountToFinish)protected voidsetCloseRing(boolean closeRing)protected voidsetDrawBandLines(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:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classBasicTool
-
mouseLocationChanged
protected void mouseLocationChanged(MouseEvent e)
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classIndicatorTool
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classIndicatorTool
-
add
protected void add(Coordinate c)
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classBasicTool
-
getShape
protected Shape getShape()
Description copied from class:IndicatorToolGets the shape for displaying the current state of the action. Subclasses should override.- Overrides:
getShapein classIndicatorTool- Returns:
- null if nothing should be drawn
-
isFinishingRelease
protected boolean isFinishingRelease(MouseEvent e)
-
toArray
protected Coordinate[] toArray(List coordinates)
-
-