Class BoxBandTool
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.ui.tools.BasicTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.IndicatorTool
-
- org.locationtech.jtstest.testbuilder.ui.tools.BoxBandTool
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.util.EventListener,Tool
- Direct Known Subclasses:
DeleteVertexTool,ExtractComponentTool,RectangleTool
public abstract class BoxBandTool extends IndicatorTool
- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private static intMIN_MOVEMENTprivate java.awt.PointzoomBoxEndprivate java.awt.PointzoomBoxStart
-
Constructor Summary
Constructors Constructor Description BoxBandTool()BoxBandTool(java.awt.Cursor cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgestureFinished()protected GeometrygetBox()protected java.util.ListgetCoordinates()Gets the coordinates for the rectangle starting at the first point clicked.protected java.util.ListgetCoordinatesOfEnvelope()Getes the coordinates for the rectangle starting with the lower left point.protected EnvelopegetEnvelope()Gets the envelope of the indicated rectangle, in model coordinates.protected java.awt.ShapegetShape()Gets the shape for displaying the current state of the action.private booleanisSignificantMouseMove()voidmouseDragged(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(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, mouseClicked, mouseEntered, mouseExited, mouseWheelMoved, panel, toModel, toModel, toModelCoordinate, toModelSnapped, toModelSnappedIfCloseToViewGrid, toModelSnappedToViewGrid, toView, toView
-
-
-
-
Field Detail
-
zoomBoxStart
private java.awt.Point zoomBoxStart
-
zoomBoxEnd
private java.awt.Point zoomBoxEnd
-
MIN_MOVEMENT
private static final int MIN_MOVEMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classBasicTool
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin classBasicTool
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classIndicatorTool
-
getShape
protected java.awt.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
-
isSignificantMouseMove
private boolean isSignificantMouseMove()
-
getEnvelope
protected Envelope getEnvelope()
Gets the envelope of the indicated rectangle, in model coordinates.- Returns:
-
getBox
protected Geometry getBox()
-
getCoordinatesOfEnvelope
protected java.util.List getCoordinatesOfEnvelope()
Getes the coordinates for the rectangle starting with the lower left point. The coordinates are oriented CW.- Returns:
- the coordinates for the rectangle
-
getCoordinates
protected java.util.List getCoordinates()
Gets the coordinates for the rectangle starting at the first point clicked. The coordinates are oriented CW.- Returns:
- the coordinates for the rectangle
-
gestureFinished
protected void gestureFinished()
-
-