com.maryanovsky.map.client
Class MapWidget.MapWheelAction

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

public abstract static class MapWidget.MapWheelAction
extends Object
implements WheelAction

A WheelAction 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.MapWheelAction()
           
 
Method Summary
protected abstract  void mapScrolled(MapWidget mapWidget, PointView point, MouseWheelVelocity velocity)
          Invoked when the map is scrolled.
protected abstract  void mapScrolledDown(MapWidget mapWidget, PointView point)
          Invoked when the map is scrolled down.
protected abstract  void mapScrolledUp(MapWidget mapWidget, PointView point)
          Invoked when the map is scrolled up.
 void mouseWheelScrolled(Widget target, PointView point, MouseWheelVelocity velocity)
          Converts the target widget to a MapWidget and calls mapScrolled(MapWidget, PointView, MouseWheelVelocity).
 void mouseWheelScrolledDown(Widget target, PointView point)
          Converts the target widget to a MapWidget and calls mapScrolledDown(MapWidget, PointView).
 void mouseWheelScrolledUp(Widget target, PointView point)
          Converts the target widget to a MapWidget and calls mapScrolledUp(MapWidget, PointView).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapWidget.MapWheelAction

public MapWidget.MapWheelAction()
Method Detail

mouseWheelScrolledUp

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

Specified by:
mouseWheelScrolledUp in interface WheelAction
Parameters:
target - The widget over which the wheel was scrolled.
point - The location of the mouse, relative to the widget, at the time it was scrolled.

mouseWheelScrolledDown

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

Specified by:
mouseWheelScrolledDown in interface WheelAction
Parameters:
target - The widget over which the wheel was scrolled.
point - The location of the mouse, relative to the widget, at the time it was scrolled.

mouseWheelScrolled

public void mouseWheelScrolled(Widget target,
                               PointView point,
                               MouseWheelVelocity velocity)
Converts the target widget to a MapWidget and calls mapScrolled(MapWidget, PointView, MouseWheelVelocity).

Specified by:
mouseWheelScrolled in interface WheelAction
Parameters:
target - The widget over which the wheel was scrolled.
point - The location of the mouse, relative to the widget, at the time it was scrolled.
velocity - The velocity of the scroll.

mapScrolledUp

protected abstract void mapScrolledUp(MapWidget mapWidget,
                                      PointView point)
Invoked when the map is scrolled up.


mapScrolledDown

protected abstract void mapScrolledDown(MapWidget mapWidget,
                                        PointView point)
Invoked when the map is scrolled down.


mapScrolled

protected abstract void mapScrolled(MapWidget mapWidget,
                                    PointView point,
                                    MouseWheelVelocity velocity)
Invoked when the map is scrolled.