org.geotools.swing.tool
Class AbstractZoomTool

Object
  extended by MapMouseAdapter
      extended by CursorTool
          extended by AbstractZoomTool
All Implemented Interfaces:
MapMouseListener
Direct Known Subclasses:
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
Module:
modules/unsupported/swing (gt-swing.jar)

Field Summary
static double DEFAULT_ZOOM_FACTOR
          The default zoom increment
protected  double zoom
          The working zoom increment
 
Constructor Summary
AbstractZoomTool()
          Constructor
 
Method Summary
 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
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

Constructor Detail

AbstractZoomTool

public AbstractZoomTool()
Constructor

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


Copyright © 1996-2010 Geotools. All Rights Reserved.