com.maryanovsky.map.client.actions.mouse
Class ClickPanAction

java.lang.Object
  extended by com.maryanovsky.map.client.actions.MapAction<HasClickHandlers>
      extended by com.maryanovsky.map.client.actions.mouse.ClickPanAction
All Implemented Interfaces:
EventHandler, ClickHandler

public class ClickPanAction
extends MapAction<HasClickHandlers>
implements ClickHandler

Recenters (pans) the map to the clicked location.

Author:
Maryanovsky Alexander

Field Summary
 
Fields inherited from class com.maryanovsky.map.client.actions.MapAction
isAnimated, mapWidget
 
Constructor Summary
ClickPanAction(MapWidget mapWidget, boolean isAnimated)
          Creates a new ClickPanAction for panning the specified map widget.
 
Method Summary
 void onClick(ClickEvent evt)
          Invoked when a mouse button is clicked.
 HandlerRegistration registerWith(HasClickHandlers clickSource)
          Registers for handling click 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

ClickPanAction

public ClickPanAction(MapWidget mapWidget,
                      boolean isAnimated)
Creates a new ClickPanAction for panning the specified map widget.

Parameters:
mapWidget - The target map widget.
isAnimated - Whether the panning transition is animated.
Method Detail

registerWith

public HandlerRegistration registerWith(HasClickHandlers clickSource)
Registers for handling click events from the specified source.

Specified by:
registerWith in class MapAction<HasClickHandlers>

onClick

public void onClick(ClickEvent evt)
Invoked when a mouse button is clicked.

Specified by:
onClick in interface ClickHandler