org.xith3d.ui.hud.listeners
Class WidgetLocationAdapter

java.lang.Object
  extended by org.xith3d.ui.hud.listeners.WidgetLocationAdapter
All Implemented Interfaces:
WidgetLocationListener

public abstract class WidgetLocationAdapter
extends java.lang.Object
implements WidgetLocationListener

If a Widget makes use of other Widgets to be built and these Widgets produce events, that are to be catched be the Widget only, then you should create an inner class and let it extend this class to catch them, since it already implements all known Widget-Listeners (with empty method stubs).


Constructor Summary
WidgetLocationAdapter()
           
 
Method Summary
 void onWidgetDragStarted(Widget widget)
          This event is fired when a Widget is started to be dragged.
 void onWidgetDragStopped(Widget widget)
          This event is fired when a Widget is stopped to be dragged.
 void onWidgetLocationChanged(Widget widget, float oldLeft, float oldTop, float newLeft, float newTop)
          This event is fired when a Widget's location has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetLocationAdapter

public WidgetLocationAdapter()
Method Detail

onWidgetDragStarted

public void onWidgetDragStarted(Widget widget)
This event is fired when a Widget is started to be dragged.

Specified by:
onWidgetDragStarted in interface WidgetLocationListener
Parameters:
widget - the Widget, which is dragged

onWidgetDragStopped

public void onWidgetDragStopped(Widget widget)
This event is fired when a Widget is stopped to be dragged.

Specified by:
onWidgetDragStopped in interface WidgetLocationListener
Parameters:
widget - the Widget, which was dragged

onWidgetLocationChanged

public void onWidgetLocationChanged(Widget widget,
                                    float oldLeft,
                                    float oldTop,
                                    float newLeft,
                                    float newTop)
This event is fired when a Widget's location has changed.

Specified by:
onWidgetLocationChanged in interface WidgetLocationListener
Parameters:
widget - the Widget, which's location has changed
oldLeft - the old left coordinate of the Widget
oldTop - the old top coordinate of the Widget
newLeft - the new left coordinate of the Widget
newTop - the new top coordinate of the Widget