Class 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 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