Package org.geotools.swing.tool
Class AbstractZoomTool
Object
MapMouseAdapter
CursorTool
AbstractZoomTool
- All Implemented Interfaces:
MapMouseListener
- Direct Known Subclasses:
ScrollWheelTool
,ZoomInTool
,ZoomOutTool
Abstract base class for the zoom-in and zoom-out tools. Provides getter / setter methods for the zoom increment.
- Since:
- 2.6
- Author:
- Michael Bedward
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
The default zoom incrementprotected double
The working zoom increment -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class CursorTool
drawDragBox, getCursor, getMapPane, setMapPane
Methods inherited from class MapMouseAdapter
onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved
-
Field Details
-
DEFAULT_ZOOM_FACTOR
public static final double DEFAULT_ZOOM_FACTORThe default zoom increment- See Also:
-
zoom
protected double zoomThe working zoom increment
-
-
Constructor Details
-
AbstractZoomTool
public AbstractZoomTool()Constructor
-
-
Method Details
-
getZoom
public double getZoom()Get the current areal zoom increment.- Returns:
- the current zoom increment as a double
-
setZoom
public double setZoom(double newZoom) Set the zoom increment- Parameters:
newZoom
- the new zoom increment; values <= 1.0 will be ignored- Returns:
- the previous zoom increment
-