com.maryanovsky.map.client.actions.touch
Class DragPanAction

java.lang.Object
  extended by com.maryanovsky.map.client.actions.MapAction<HasAllDragHandlers>
      extended by com.maryanovsky.map.client.actions.touch.DragPanAction
All Implemented Interfaces:
EventHandler, DragCancelHandler, DragEndHandler, DragMoveHandler

public class DragPanAction
extends MapAction<HasAllDragHandlers>
implements DragMoveHandler, DragEndHandler, DragCancelHandler

Pans the map as the user drags his finger across the map widget.

Author:
Maryanovsky Alexander

Field Summary
 
Fields inherited from class com.maryanovsky.map.client.actions.MapAction
isAnimated, mapWidget
 
Constructor Summary
DragPanAction(MapWidget mapWidget)
          Creates a new DragPanAction for the specified map widget.
 
Method Summary
 void onDragCancel(DragCancelEvent evt)
          Invoked when a drag gesture is cancelled.
 void onDragEnd(DragEndEvent evt)
          Invoked when a drag gesture ends.
 void onDragMove(DragMoveEvent evt)
          Invoked when a drag gesture is in progress.
 HandlerRegistration registerWith(HasAllDragHandlers dragSource)
          Registers for handling drag events from the specified source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragPanAction

public DragPanAction(MapWidget mapWidget)
Creates a new DragPanAction for the specified map widget.

Parameters:
mapWidget - The target map widget.
Method Detail

registerWith

public HandlerRegistration registerWith(HasAllDragHandlers dragSource)
Registers for handling drag events from the specified source.

Specified by:
registerWith in class MapAction<HasAllDragHandlers>

onDragMove

public void onDragMove(DragMoveEvent evt)
Invoked when a drag gesture is in progress.

Specified by:
onDragMove in interface DragMoveHandler

onDragEnd

public void onDragEnd(DragEndEvent evt)
Invoked when a drag gesture ends.

Specified by:
onDragEnd in interface DragEndHandler

onDragCancel

public void onDragCancel(DragCancelEvent evt)
Invoked when a drag gesture is cancelled.

Specified by:
onDragCancel in interface DragCancelHandler