|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.utils.ButtonGroup
public class ButtonGroup
This class can be used to group StateButton Widgets. Only one StateButton in the group can have an ACTIVATED state.
The attached WidgetStateListeners are only notified for the StateButton, that has been activated, but not for the one, that has
been deactivated (automatically).
| Constructor Summary | |
|---|---|
ButtonGroup()
Creates a new ButtonGroup. |
|
| Method Summary | |
|---|---|
void |
addStateButton(StateButton button)
Adds a new StateButton to this group. |
void |
addStateListener(WidgetStateListener listener)
Adds a WidgetStateListener. |
protected void |
notifyListeners(StateButton button)
Notifies all added listeners about a state event. |
void |
onButtonActivated(StateButton button)
This method is invoked by the appropriate event in the StateButton class. |
void |
removeStateButton(StateButton button)
Removes a StateButton from this group. |
void |
removeStateListener(WidgetStateListener listener)
Removes a WidgetStateListener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonGroup()
ButtonGroup.
| Method Detail |
|---|
public void addStateListener(WidgetStateListener listener)
WidgetStateListener.
listener - org.xith3d.ui.hud.listeners.WidgetStateListener - the listener to add.public void removeStateListener(WidgetStateListener listener)
WidgetStateListener.
listener - org.xith3d.ui.hud.listeners.WidgetStateListener - the listener to remove.protected final void notifyListeners(StateButton button)
button - org.xith3d.ui.hud.base.StateButton - the button whose state just changed.public void onButtonActivated(StateButton button)
StateButton class.
It will deactivate the currently activated StateButton.
button - org.xith3d.ui.hud.base.StateButton - the new activated StateButtonpublic void addStateButton(StateButton button)
StateButton to this group.
button - org.xith3d.ui.hud.base.StateButton - the StateButton to add to this group.public void removeStateButton(StateButton button)
StateButton from this group.
button - org.xith3d.ui.hud.base.StateButton - the StateButton to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||