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 int
MIN_MOVEMENT
private java.awt.Point
zoomBoxEnd
private java.awt.Point
zoomBoxStart
-
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 void
gestureFinished()
protected Geometry
getBox()
protected java.util.List
getCoordinates()
Gets the coordinates for the rectangle starting at the first point clicked.protected java.util.List
getCoordinatesOfEnvelope()
Getes the coordinates for the rectangle starting with the lower left point.protected Envelope
getEnvelope()
Gets the envelope of the indicated rectangle, in model coordinates.protected java.awt.Shape
getShape()
Gets the shape for displaying the current state of the action.private boolean
isSignificantMouseMove()
void
mouseDragged(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(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:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classBasicTool
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classBasicTool
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classIndicatorTool
-
getShape
protected java.awt.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
-
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()
-
-