org.xith3d.ui.hud.listeners
Class WidgetContainerAdapter

java.lang.Object
  extended by org.xith3d.ui.hud.listeners.WidgetContainerAdapter
All Implemented Interfaces:
WidgetContainerListener

public abstract class WidgetContainerAdapter
extends java.lang.Object
implements WidgetContainerListener

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
WidgetContainerAdapter()
           
 
Method Summary
 void onWidgetAttachedToContainer(Widget widget, WidgetContainer container)
          This event is fired, when a Widget is added to a WidgetContainer.
 void onWidgetAttachedToHUD(Widget widget, HUD hud)
          This event is fired, when a Widget is added to a WidgetContainer and the container itself is already added to the HUD or is the HUD itself.
 void onWidgetDetachedFromContainer(Widget widget, WidgetContainer container)
          This event is fired, when a Widget is removed from a WidgetContainer.
 void onWidgetDetachedFromHUD(Widget widget, HUD hud)
          This event is fired, when a Widget is removed from a HUD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetContainerAdapter

public WidgetContainerAdapter()
Method Detail

onWidgetAttachedToContainer

public void onWidgetAttachedToContainer(Widget widget,
                                        WidgetContainer container)
This event is fired, when a Widget is added to a WidgetContainer.

Specified by:
onWidgetAttachedToContainer in interface WidgetContainerListener
Parameters:
widget - the Widget, which is added to a WidgetContainer
container - the WidgetContainer, the Widget is added to

onWidgetDetachedFromContainer

public void onWidgetDetachedFromContainer(Widget widget,
                                          WidgetContainer container)
This event is fired, when a Widget is removed from a WidgetContainer.

Specified by:
onWidgetDetachedFromContainer in interface WidgetContainerListener
Parameters:
widget - the Widget, which is removed from a WidgetContainer
container - the WidgetContainer, the Widget is removed from

onWidgetAttachedToHUD

public void onWidgetAttachedToHUD(Widget widget,
                                  HUD hud)
This event is fired, when a Widget is added to a WidgetContainer and the container itself is already added to the HUD or is the HUD itself.

Specified by:
onWidgetAttachedToHUD in interface WidgetContainerListener
Parameters:
widget - the Widget, which is added to a WidgetContainer
hud - the HUD, the Widget is added to

onWidgetDetachedFromHUD

public void onWidgetDetachedFromHUD(Widget widget,
                                    HUD hud)
This event is fired, when a Widget is removed from a HUD.

Specified by:
onWidgetDetachedFromHUD in interface WidgetContainerListener
Parameters:
widget - the Widget, which is removed from a HUD
hud - the HUD, the Widget is removed from