org.gvsig.fmap.mapcontrol.tools
Class PanListenerImpl

java.lang.Object
  extended by 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 Summary
PanListenerImpl(MapControl mapControl)
          Creates a new listener for changing the position of the extent of the associated MapControl object.
 
Method Summary
 boolean cancelDrawing()
          Determines if the drawing process that this tool executes on the MapControl instance could be canceled or not.
 Image getImageCursor()
          Gets the Cursor associated to this tool.
 void move(MoveEvent event)
          Called when user drags the mouse on the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2004-2013 gvSIG. All Rights Reserved.