|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.listeners.WidgetInputAdapter
public abstract class WidgetInputAdapter
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 | |
|---|---|
WidgetInputAdapter()
|
|
| 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. |
void |
onKeyPressed(Widget widget,
org.jagatoo.input.devices.components.Key key,
int modifierMask,
long when)
This event is fired, when a key is pressed on a focused Widget. |
void |
onKeyReleased(Widget widget,
org.jagatoo.input.devices.components.Key key,
int modifierMask,
long when)
This event is fired, when a key is released on a focused Widget. |
void |
onKeyTyped(Widget widget,
char ch,
int modifierMask,
long when)
This event is fired when a key is typed on the keyboard. |
void |
onMouseButtonPressed(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is pressed on a focused Widget. |
void |
onMouseButtonReleased(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget. |
void |
onMouseEntered(Widget widget,
boolean isTopMost,
boolean hasFocus)
This method is called when the mouse entered the Widget area. |
void |
onMouseExited(Widget widget,
boolean isTopMost,
boolean hasFocus)
This method is called when the mouse exited the Widget area. |
void |
onMouseMoved(Widget widget,
float x,
float y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse is moved on a Widget. |
void |
onMouseStopped(Widget widget,
float x,
float y,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse position has not been changed on this Widget for a certain amount of time. |
void |
onMouseWheelMoved(Widget widget,
int delta,
boolean isPageMove,
float x,
float y,
long when,
boolean isTopMost)
This event is fired, when the mouse wheel is moved on a Widget. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WidgetInputAdapter()
| Method Detail |
|---|
public void onKeyPressed(Widget widget,
org.jagatoo.input.devices.components.Key key,
int modifierMask,
long when)
onKeyPressed in interface WidgetKeyboardListenerwidget - the Widget for which this event was firedkey - the key that was pressedmodifierMask - the mask of modifier keyswhen - the gameTime of the key event
public void onKeyReleased(Widget widget,
org.jagatoo.input.devices.components.Key key,
int modifierMask,
long when)
onKeyReleased in interface WidgetKeyboardListenerwidget - the Widget for which this event was firedkey - the key that was releasedmodifierMask - the mask of modifier keyswhen - the gameTime of the key event
public void onKeyTyped(Widget widget,
char ch,
int modifierMask,
long when)
onKeyTyped in interface WidgetKeyboardListenerwidget - the Widget for which this event was firedch - the typed key's charactermodifierMask - the mask of modifier keyswhen - the gameTime of the key event
public void onMouseButtonPressed(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface WidgetMouseListenerwidget - the Widget for which this event was firedbutton - the button that was pressedx - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventlastWhen - the milli-time when the button has last been pressedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseButtonReleased(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface WidgetMouseListenerwidget - the Widget for which this event was firedbutton - the button that was releasedx - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventlastWhen - the milli-time when the button has last been releasedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseMoved(Widget widget,
float x,
float y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface WidgetMouseListenerwidget - the Widget for which this event was firedx - the new X coordinatey - the new Y coordinatebuttonsState - the buttons' state bitmaskwhen - the gameTime of the mouse eventisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseStopped(Widget widget,
float x,
float y,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseStopped in interface WidgetMouseListenerwidget - the Widget for which this event was firedx - the new X coordinatey - the new Y coordinatewhen - the gameTime of the mouse eventisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseWheelMoved(Widget widget,
int delta,
boolean isPageMove,
float x,
float y,
long when,
boolean isTopMost)
onMouseWheelMoved in interface WidgetMouseListenerwidget - the Widget for which this event was fireddelta - a positive value when the wheel was moved upisPageMove - true, if whole pages are to be scrolled with this wheel movex - the current mouse x positiony - the current mouse y positionwhen - the gameTime of the mouse eventisTopMost - is this Widget topMost
public void onMouseEntered(Widget widget,
boolean isTopMost,
boolean hasFocus)
onMouseEntered in interface WidgetMouseListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseExited(Widget widget,
boolean isTopMost,
boolean hasFocus)
onMouseExited in interface WidgetMouseListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onControllerButtonPressed(Widget widget,
org.jagatoo.input.devices.components.ControllerButton button,
long when)
onControllerButtonPressed in interface WidgetControllerListenerwidget - the Widget for which this event was firedbutton - the pressed buttonwhen - the gameTime of the event
public void onControllerButtonReleased(Widget widget,
org.jagatoo.input.devices.components.ControllerButton button,
long when)
onControllerButtonReleased in interface WidgetControllerListenerwidget - the Widget for which this event was firedbutton - the released buttonwhen - the gameTime of the event
public void onControllerAxisChanged(Widget widget,
org.jagatoo.input.devices.components.ControllerAxis axis,
float axisDelta,
long when)
onControllerAxisChanged in interface WidgetControllerListenerwidget - the Widget for which this event was firedaxis - the changed axiswhen - the gameTime of the event
public void onInputStateChanged(Widget widget,
org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
long when,
boolean isTopMost,
boolean hasFocus)
onInputStateChanged in interface WidgetControllerListeneronInputStateChanged in interface WidgetKeyboardListeneronInputStateChanged in interface WidgetMouseListenerwidget - the Widget for which this event was firedwhen - the gameTime of the event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||