Class ZoomAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, SelectionManager.SelectionEnded, PreferenceChangedListener, Destroyable

    public class ZoomAction
    extends MapMode
    implements SelectionManager.SelectionEnded
    Enable the zoom mode within the MapFrame. Holding down the left mouse button select a rectangle with the same aspect ratio than the current map view. Holding down left and right let the user move the former selected rectangle. Releasing the left button zoom to the selection. Rectangle selections with either height or width smaller than 3 pixels are ignored.
    Since:
    1
    See Also:
    Serialized Form
    • Field Detail

      • selectionManager

        private final transient SelectionManager selectionManager
        Manager that manages the selection rectangle with the aspect ratio of the MapView.
    • Constructor Detail

      • ZoomAction

        public ZoomAction​(MapFrame mapFrame)
        Construct a ZoomAction without a label.
        Parameters:
        mapFrame - The MapFrame, whose zoom mode should be enabled.