|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.utils.WidgetZIndexGroup
public class WidgetZIndexGroup
This class can be used to logically group some Widgets by their z-index. When one Widget is clicked, it's z-index will be set to the maximum z-index of the group and the ones lying over it are being set a lower z-index.
| Constructor Summary | |
|---|---|
WidgetZIndexGroup()
Creates a new WidgetZIndexGroup. |
|
WidgetZIndexGroup(int quantum)
Creates a new WidgetZIndexGroup. |
|
| Method Summary | |
|---|---|
void |
add(Widget widget)
Adds a Widget to this logic group. |
int |
getMaxZIndex()
|
int |
getQuantum()
|
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 |
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 |
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. |
boolean |
remove(Widget widget)
Removes a Widget from this logic group. |
void |
setMaxZIndex(int mzi)
Sets the maximum z-index, which will be set to the last clicked Widget in the group. |
void |
setQuantum(int quantum)
Sets the step the zIndices are altered with. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WidgetZIndexGroup(int quantum)
quantum - the step the zIndices are altered with (default: 1)public WidgetZIndexGroup()
| Method Detail |
|---|
public void setMaxZIndex(int mzi)
mzi - the new maximum z-indexpublic int getMaxZIndex()
public void setQuantum(int quantum)
public int getQuantum()
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 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 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 focusedpublic void onMouseUnbound(Widget widget)
onMouseUnbound in interface WidgetInputListenerwidget - the Widget, which was unbound from the mouse
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 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 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)
onInputStateChanged in interface WidgetInputListenerwidget - the Widget for which this event was firedpublic void add(Widget widget)
widget - the Widget to addpublic boolean remove(Widget widget)
widget - the Widget to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||