Class PanListenerImpl

java.lang.Object
org.gvsig.fmap.mapcontrol.tools.PanListenerImpl
All Implemented Interfaces:
PanListener, ToolListener

public class PanListenerImpl extends Object implements PanListener

Listener for moving the extent of the associated MapControl object according the movement between the initial and final points of line determined by the movement dragging with the third button of the mouse.

Updates the extent of its ViewPort with the new position.

Author:
Vicente Caballero Navarro
  • Constructor Details

    • PanListenerImpl

      public PanListenerImpl(MapControl mapControl)

      Creates a new listener for changing the position of the extent of the associated MapControl object.

      Parameters:
      mapControl - the MapControl where will be applied the changes
  • Method Details

    • move

      public void move(MoveEvent event)
      Description copied from interface: PanListener

      Called when user drags the mouse on the view.

      Updates the extent coordinates according to the direction of the movement between the initial and final points of line determined by the move of the mouse.

      Specified by:
      move in interface PanListener
      Parameters:
      event - mouse event information about the initial and final positions of the movement
    • getImageCursor

      public Image getImageCursor()
      Description copied from interface: ToolListener

      Gets the Cursor associated to this tool.

      Specified by:
      getImageCursor in interface ToolListener
      Returns:
      component with the bitmap associated to this tool
    • cancelDrawing

      public boolean cancelDrawing()
      Description copied from interface: ToolListener

      Determines if the drawing process that this tool executes on the MapControl instance could be canceled or not.

      Specified by:
      cancelDrawing in interface ToolListener
      Returns:
      true if is cancellable; otherwise returns false