Class ZoomTool
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
-
- org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
-
- org.locationtech.jts.jump.workbench.ui.zoom.ZoomTool
-
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,EventListener
,CursorTool
public class ZoomTool extends DragTool
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Field Summary
-
Fields inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
-
-
Constructor Summary
Constructors Constructor Description ZoomTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(LayerViewPanel layerViewPanel)
void
deactivate()
protected void
gestureFinished()
Cursor
getCursor()
Icon
getIcon()
String
getName()
Returns a very brief description of this CursorTool.boolean
isRightMouseButtonUsed()
void
mouseClicked(MouseEvent e)
void
mouseDragged(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mouseMoved(MouseEvent e)
void
mousePressed(MouseEvent e)
Begins handling of the drag.void
mouseReleased(MouseEvent e)
-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClick
-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRollingBackInvalidEdits, isShapeOnScreen, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
-
-
-
-
Method Detail
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
getName
public String getName()
Description copied from interface:CursorTool
Returns a very brief description of this CursorTool.- Specified by:
getName
in interfaceCursorTool
- Overrides:
getName
in classAbstractCursorTool
- Returns:
- the name of this CursorTool
-
getCursor
public Cursor getCursor()
- Specified by:
getCursor
in interfaceCursorTool
- Overrides:
getCursor
in classAbstractCursorTool
-
gestureFinished
protected void gestureFinished() throws NoninvertibleTransformException
- Specified by:
gestureFinished
in classAbstractCursorTool
- Throws:
NoninvertibleTransformException
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classAbstractCursorTool
-
mousePressed
public void mousePressed(MouseEvent e)
Description copied from class:DragTool
Begins handling of the drag. Subclasses can prevent handling of the drag by overriding this method and not calling it.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classDragTool
-
isRightMouseButtonUsed
public boolean isRightMouseButtonUsed()
- Specified by:
isRightMouseButtonUsed
in interfaceCursorTool
- Overrides:
isRightMouseButtonUsed
in classAbstractCursorTool
- Returns:
- true if this CursorTool uses the right mouse button; false to allow the panel to show a popup-menu on right-clicks
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classDragTool
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classDragTool
-
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate
in interfaceCursorTool
- Overrides:
activate
in classAbstractCursorTool
-
deactivate
public void deactivate()
- Specified by:
deactivate
in interfaceCursorTool
- Overrides:
deactivate
in classAbstractCursorTool
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interfaceMouseListener
- Overrides:
mouseEntered
in classAbstractCursorTool
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interfaceMouseListener
- Overrides:
mouseExited
in classAbstractCursorTool
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classAbstractCursorTool
-
-