Class MapOverviewChangeZoomListener

java.lang.Object
org.gvsig.app.project.documents.view.toolListeners.MapOverviewChangeZoomListener
All Implemented Interfaces:
org.gvsig.fmap.mapcontrol.tools.Listeners.PanListener, org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener, org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener

public class MapOverviewChangeZoomListener extends Object implements org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener, org.gvsig.fmap.mapcontrol.tools.Listeners.PanListener

Listener for changes of the zoom caused by selecting a rectangular area on the associated MapOverview object with the first button of the mouse.

If the kind of action was a movement on the associated object, updates the extent of its rectangular area.

If the kind of action is the selection of a rectangular area, and is bigger than 3x3 pixels, applies a zoom in operation centering its ViewPort according the equivalent extent in map coordinates.

Author:
jmvivo
See Also:
  • ViewPort
  • Field Details

    • mapControl

      protected org.gvsig.fmap.mapcontrol.MapControl mapControl
      Reference to the MapControl object that uses.
  • Constructor Details

    • MapOverviewChangeZoomListener

      public MapOverviewChangeZoomListener(org.gvsig.fmap.mapcontrol.MapControl mapControl)

      Creates a new listener for changes of zoom at the associated MapOverview object.

      Parameters:
      mapControl - the MapControl object which represents the MapOverview
  • Method Details

    • rectangle

      public void rectangle(org.gvsig.fmap.mapcontrol.tools.Events.EnvelopeEvent event) throws org.gvsig.fmap.mapcontrol.tools.BehaviorException
      Specified by:
      rectangle in interface org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener
      Throws:
      org.gvsig.fmap.mapcontrol.tools.BehaviorException
    • getImageCursor

      public Image getImageCursor()
      Specified by:
      getImageCursor in interface org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener
    • cancelDrawing

      public boolean cancelDrawing()
      Specified by:
      cancelDrawing in interface org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener
    • move

      public void move(org.gvsig.fmap.mapcontrol.tools.Events.MoveEvent event) throws org.gvsig.fmap.mapcontrol.tools.BehaviorException
      Specified by:
      move in interface org.gvsig.fmap.mapcontrol.tools.Listeners.PanListener
      Throws:
      org.gvsig.fmap.mapcontrol.tools.BehaviorException