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.
Constructor and Description |
---|
PanListenerImpl(MapControl mapControl)
Creates a new listener for changing the position of the extent of the associated
MapControl object. |
Modifier and Type | Method and Description |
---|---|
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.
|
public PanListenerImpl(MapControl mapControl)
Creates a new listener for changing the position of the extent of the associated MapControl
object.
mapControl
- the MapControl
where will be applied the changespublic void move(MoveEvent event)
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.
move
in interface PanListener
event
- mouse event information about the initial and final positions of the movementpublic Image getImageCursor()
ToolListener
Gets the Cursor
associated to this tool.
getImageCursor
in interface ToolListener
public boolean cancelDrawing()
ToolListener
Determines if the drawing process that this tool executes on the MapControl
instance could be canceled or not.
cancelDrawing
in interface ToolListener
true
if is cancellable; otherwise returns false