org.xith3d.ui.hud.listeners
Class WidgetControllerAdapter

java.lang.Object
  extended by org.xith3d.ui.hud.listeners.WidgetControllerAdapter
All Implemented Interfaces:
WidgetControllerListener

public abstract class WidgetControllerAdapter
extends java.lang.Object
implements WidgetControllerListener

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
WidgetControllerAdapter()
           
 
Method Summary
 void onControllerAxisChanged(Widget widget, org.jagatoo.input.devices.components.ControllerAxis axis, float axisDelta, long when)
          This event is fired when a ControllerAxis has changed and this Widget is the currently focussed one.
 void onControllerButtonPressed(Widget widget, org.jagatoo.input.devices.components.ControllerButton button, long when)
          This event is fired when a ControllerButton has been pressed and this Widget is the currently focussed one.
 void onControllerButtonReleased(Widget widget, org.jagatoo.input.devices.components.ControllerButton button, long when)
          This event is fired when a ControllerButton has been released and this Widget is the currently focussed one.
 void onInputStateChanged(Widget widget, org.jagatoo.input.devices.components.DeviceComponent comp, int delta, int state, long when, boolean isTopMost, boolean hasFocus)
          This event is fired when the state of any DeviceComponent has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetControllerAdapter

public WidgetControllerAdapter()
Method Detail

onControllerButtonPressed

public void onControllerButtonPressed(Widget widget,
                                      org.jagatoo.input.devices.components.ControllerButton button,
                                      long when)
This event is fired when a ControllerButton has been pressed and this Widget is the currently focussed one.

Specified by:
onControllerButtonPressed in interface WidgetControllerListener
Parameters:
widget - the Widget for which this event was fired
button - the pressed button
when - the gameTime of the event

onControllerButtonReleased

public void onControllerButtonReleased(Widget widget,
                                       org.jagatoo.input.devices.components.ControllerButton button,
                                       long when)
This event is fired when a ControllerButton has been released and this Widget is the currently focussed one.

Specified by:
onControllerButtonReleased in interface WidgetControllerListener
Parameters:
widget - the Widget for which this event was fired
button - the released button
when - the gameTime of the event

onControllerAxisChanged

public void onControllerAxisChanged(Widget widget,
                                    org.jagatoo.input.devices.components.ControllerAxis axis,
                                    float axisDelta,
                                    long when)
This event is fired when a ControllerAxis has changed and this Widget is the currently focussed one.

Specified by:
onControllerAxisChanged in interface WidgetControllerListener
Parameters:
widget - the Widget for which this event was fired
axis - the changed axis
when - the gameTime of the event

onInputStateChanged

public void onInputStateChanged(Widget widget,
                                org.jagatoo.input.devices.components.DeviceComponent comp,
                                int delta,
                                int state,
                                long when,
                                boolean isTopMost,
                                boolean hasFocus)
This event is fired when the state of any DeviceComponent has changed.

Specified by:
onInputStateChanged in interface WidgetControllerListener
Parameters:
widget - the Widget for which this event was fired
when - the gameTime of the event