com.maryanovsky.map.client
Class MapWidget.MapClickAction

java.lang.Object
  extended by com.maryanovsky.map.client.MapWidget.MapClickAction
All Implemented Interfaces:
ClickAction
Enclosing class:
MapWidget

public abstract static class MapWidget.MapClickAction
extends Object
implements ClickAction

A ClickAction on the map widget. This is a convenience class which converts the event's target widget to a MapWidget. Additionally, it makes sure to invoke the delegate method only if the MapWidget is already displaying a (non null) map.


Constructor Summary
MapWidget.MapClickAction()
           
 
Method Summary
protected abstract  void mapClicked(MapWidget mapWidget, PointView point)
          Invoked when the map is clicked.
 void mouseClicked(Widget target, PointView point)
          Converts the target widget to a MapWidget and calls mapClicked(MapWidget, PointView).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapWidget.MapClickAction

public MapWidget.MapClickAction()
Method Detail

mouseClicked

public void mouseClicked(Widget target,
                         PointView point)
Converts the target widget to a MapWidget and calls mapClicked(MapWidget, PointView).

Specified by:
mouseClicked in interface ClickAction
Parameters:
target - The widget that was clicked.
point - The clicked point, relative to the widget's origin.

mapClicked

protected abstract void mapClicked(MapWidget mapWidget,
                                   PointView point)
Invoked when the map is clicked.