Package org.geotools.swing.tool
Class AbstractZoomTool
- Object
-
- MapMouseAdapter
-
- CursorTool
-
- AbstractZoomTool
-
- All Implemented Interfaces:
MapMouseListener
- Direct Known Subclasses:
ScrollWheelTool
,ZoomInTool
,ZoomOutTool
public abstract class AbstractZoomTool extends CursorTool
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
Fields Modifier and Type Field Description static double
DEFAULT_ZOOM_FACTOR
The default zoom incrementprotected double
zoom
The working zoom increment
-
Constructor Summary
Constructors Constructor Description AbstractZoomTool()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getZoom()
Get the current areal zoom increment.double
setZoom(double newZoom)
Set the zoom increment-
Methods inherited from class CursorTool
drawDragBox, getCursor, getMapPane, setMapPane
-
Methods inherited from class MapMouseAdapter
onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved
-
-
-
-
Field Detail
-
DEFAULT_ZOOM_FACTOR
public static final double DEFAULT_ZOOM_FACTOR
The default zoom increment- See Also:
- Constant Field Values
-
zoom
protected double zoom
The working zoom increment
-
-
Method Detail
-
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
-
-