|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.listeners.WidgetEventsReceiverAdapter<ListItem>
public abstract class WidgetEventsReceiverAdapter<ListItem extends Widget>
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 | |
|---|---|
WidgetEventsReceiverAdapter()
|
|
| Method Summary | |
|---|---|
void |
onButtonClicked(Button button,
java.lang.Object userObject)
This event is fired when a Button was clicked. |
void |
onButtonStateChanged(StateButton stateButton,
StateButton.State state,
java.lang.Object userObject)
This event will be fired when a StateButton's state has changed. |
void |
onControllerAxisChanged(Widget widget,
org.jagatoo.input.devices.components.ControllerAxis axis,
int axisDelta)
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)
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)
This event is fired when a ControllerButton has been released and this Widget is the currently focussed one. |
void |
onDialogClosed(Dialog dialog,
java.lang.Object closeCommand)
This event is fired when a Dialog is closed. |
void |
onFocusGained(Widget widget)
This event is fired, when the focus is gained to a Widget. |
void |
onFocusLost(Widget widget)
This event is fired, when the focus is lost by a Widget. |
void |
onInputStateChanged(Widget widget,
org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
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,
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,
long when)
This event is fired, when a key is released on a focused Widget. |
void |
onKeyTyped(Widget widget,
char ch,
long when)
This event is fired when a key is typed on the keyboard. |
void |
onListItemClicked(AbstractList<ListItem> list,
ListItem item)
This event is fired, when a List Item is clicked. |
void |
onListSelectionChanged(AbstractList<ListItem> list,
ListItem oldSelection,
ListItem newSelection)
This event is fired, when the List's selection has changed. |
void |
onMouseButtonPressed(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
int x,
int 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,
int x,
int 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 |
onMouseLeft(Widget widget,
boolean isTopMost,
boolean hasFocus)
This method is called when the mouse left the Widget area |
void |
onMouseMoved(Widget widget,
int x,
int 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,
int x,
int 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 |
onMouseUnbound(Widget widget)
This event is fired, when the mouse is released. |
void |
onMouseWheelMoved(Widget widget,
int delta,
boolean isPageMove,
int x,
int y,
long when,
boolean isTopMost)
This event is fired, when the mouse wheel is moved on a Widget. |
void |
onScrollbarValueChanged(Scrollbar scrollbar,
int newValue,
Scrollbar.Direction direction)
This event is fired when the value of a Scrollbar has changed. |
void |
onSliderValueChanged(Slider slider,
int newValue)
This event is fired when the value of a Slider has changed. |
void |
onWidgetAddedToContainer(WidgetContainer container,
Widget widget)
This event is fired, when a Widget is added to a WidgetContainer. |
void |
onWidgetAddedToHUD(HUD hud,
Widget widget)
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 |
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. |
void |
onWidgetRemovedFromContainer(WidgetContainer container,
Widget widget)
This event is fired, when a Widget is removed from a WidgetContainer. |
void |
onWidgetSizeChanged(Widget widget,
float oldWidth,
float oldHeight,
float newWidth,
float newHeight)
This event is fired when a Widget's size has changed. |
void |
onWidgetVisibilityChanged(Widget widget,
boolean isVisible)
This event is fired when a Widget's visibility state has changed. |
void |
onWindowClosed(Window frame)
This event is fired when a Window is closed. |
void |
onWindowHidden(Window frame)
This event is fired when a Window is set invisible. |
void |
onWindowShown(Window frame)
This event is fired when a Window is set visible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WidgetEventsReceiverAdapter()
| Method Detail |
|---|
public void onKeyPressed(Widget widget,
org.jagatoo.input.devices.components.Key key,
long when)
onKeyPressed in interface WidgetInputListenerwidget - the Widget for which this event was firedkey - the key that was pressedwhen - the gameTime of the key event
public void onKeyReleased(Widget widget,
org.jagatoo.input.devices.components.Key key,
long when)
onKeyReleased in interface WidgetInputListenerwidget - the Widget for which this event was firedkey - the key that was releasedwhen - the gameTime of the key event
public void onKeyTyped(Widget widget,
char ch,
long when)
onKeyTyped in interface WidgetInputListenerwidget - the Widget for which this event was firedch - the typed key's characterwhen - the gameTime of the key event
public void onMouseButtonPressed(Widget widget,
org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface WidgetInputListenerwidget - 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,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface WidgetInputListenerwidget - 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,
int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface WidgetInputListenerwidget - 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,
int x,
int y,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseStopped in interface WidgetInputListenerwidget - 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,
int x,
int y,
long when,
boolean isTopMost)
onMouseWheelMoved in interface WidgetInputListenerwidget - 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 WidgetInputListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseLeft(Widget widget,
boolean isTopMost,
boolean hasFocus)
onMouseLeft in interface WidgetInputListenerwidget - the Widget for which this event was firedisTopMost - is this Widget topMosthasFocus - is this Widget focusedpublic void onMouseUnbound(Widget widget)
onMouseUnbound in interface WidgetInputListenerwidget - the Widget, which was unbound from the mouse
public void onControllerButtonPressed(Widget widget,
org.jagatoo.input.devices.components.ControllerButton button)
onControllerButtonPressed in interface WidgetInputListenerwidget - the Widget for which this event was firedbutton - the pressed button
public void onControllerButtonReleased(Widget widget,
org.jagatoo.input.devices.components.ControllerButton button)
onControllerButtonReleased in interface WidgetInputListenerwidget - the Widget for which this event was firedbutton - the released button
public void onControllerAxisChanged(Widget widget,
org.jagatoo.input.devices.components.ControllerAxis axis,
int axisDelta)
onControllerAxisChanged in interface WidgetInputListenerwidget - the Widget for which this event was firedaxis - the changed axis
public void onInputStateChanged(Widget widget,
org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
boolean isTopMost,
boolean hasFocus)
WidgetInputListener
onInputStateChanged in interface WidgetInputListenerwidget - the Widget for which this event was firedpublic void onFocusGained(Widget widget)
onFocusGained in interface WidgetFocusListenerwidget - the Widget, which was gained the focuspublic void onFocusLost(Widget widget)
onFocusLost in interface WidgetFocusListenerwidget - the Widget, which has lost the focuspublic void onWidgetDragStarted(Widget widget)
onWidgetDragStarted in interface WidgetLocationListenerwidget - the Widget, which is draggedpublic void onWidgetDragStopped(Widget widget)
onWidgetDragStopped in interface WidgetLocationListenerwidget - the Widget, which was dragged
public void onWidgetLocationChanged(Widget widget,
float oldLeft,
float oldTop,
float newLeft,
float newTop)
onWidgetLocationChanged in interface WidgetLocationListenerwidget - the Widget, which's location has changedoldLeft - the old left coordinate of the WidgetoldTop - the old top coordinate of the WidgetnewLeft - the new left coordinate of the WidgetnewTop - the new top coordinate of the Widget
public void onWidgetSizeChanged(Widget widget,
float oldWidth,
float oldHeight,
float newWidth,
float newHeight)
onWidgetSizeChanged in interface WidgetSizeListenerwidget - the Widget, which's size has changedoldWidth - the new width of the WidgetoldHeight - the new height of the WidgetnewWidth - the new width of the WidgetnewHeight - the new height of the Widget
public void onWidgetVisibilityChanged(Widget widget,
boolean isVisible)
onWidgetVisibilityChanged in interface WidgetVisibilityListener
public void onWidgetAddedToContainer(WidgetContainer container,
Widget widget)
onWidgetAddedToContainer in interface WidgetContainerListenercontainer - the WidgetContainer, the Widget is added towidget - the Widget, which is added to a WidgetContainer
public void onWidgetAddedToHUD(HUD hud,
Widget widget)
onWidgetAddedToHUD in interface WidgetContainerListenerhud - the HUD, the Widget is added towidget - the Widget, which is added to a WidgetContainer
public void onWidgetRemovedFromContainer(WidgetContainer container,
Widget widget)
onWidgetRemovedFromContainer in interface WidgetContainerListenercontainer - the WidgetContainer, the Widget is removed fromwidget - the Widget, which is removed from a WidgetContainer
public void onButtonClicked(Button button,
java.lang.Object userObject)
onButtonClicked in interface ButtonListenerbutton - the clicked ButtonuserObject - the Button's userObject
public void onButtonStateChanged(StateButton stateButton,
StateButton.State state,
java.lang.Object userObject)
onButtonStateChanged in interface WidgetStateListenerstateButton - the StateButton, which's state has changedstate - the new stateuserObject - the StateButton's user-object
public void onListItemClicked(AbstractList<ListItem> list,
ListItem item)
onListItemClicked in interface ListSelectionListener<ListItem extends Widget>list - the list, that fired this eventitem - the clicked Item
public void onListSelectionChanged(AbstractList<ListItem> list,
ListItem oldSelection,
ListItem newSelection)
onListSelectionChanged in interface ListSelectionListener<ListItem extends Widget>list - the list, that fired this eventoldSelection - the pre-event selected ItemnewSelection - the new current selected Item
public void onScrollbarValueChanged(Scrollbar scrollbar,
int newValue,
Scrollbar.Direction direction)
onScrollbarValueChanged in interface ScrollbarListenerscrollbar - the Scrollbar, which's value has changednewValue - the new (current) value of the Scrollbardirection - the direction in which the scolling happened
public void onSliderValueChanged(Slider slider,
int newValue)
onSliderValueChanged in interface SliderListenerslider - the Slider, which's value has changednewValue - the new (current) value of the Sliderpublic void onWindowClosed(Window frame)
onWindowClosed in interface WindowListenerframe - the closed Windowpublic void onWindowHidden(Window frame)
onWindowHidden in interface WindowListenerframe - the hidden Windowpublic void onWindowShown(Window frame)
onWindowShown in interface WindowListenerframe - the shown Window
public void onDialogClosed(Dialog dialog,
java.lang.Object closeCommand)
onDialogClosed in interface DialogListenerdialog - the Dialog that was closedcloseCommand - the close-command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||