|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.ButtonGroup
public class ButtonGroup
Manages a group of ToggleButtons, ensuring that only one is selected at any given time.
| Field Summary |
|---|
| Fields inherited from interface com.threerings.opengl.gui.Selectable |
|---|
SELECT |
| Constructor Summary | |
|---|---|
ButtonGroup(ToggleButton... buttons)
Creates a new button group. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
Dispatched when a component has generated an "action". |
void |
add(ToggleButton button)
Adds a button to the group. |
void |
addListener(ActionListener listener)
Adds a listener for selection changes. |
ToggleButton |
getButton(int idx)
Returns the button at the specified index. |
int |
getButtonCount()
Returns the number of buttons in the group. |
ToggleButton |
getSelected()
Get the selected item, if any. |
ToggleButton |
getSelectedButton()
Deprecated. |
int |
getSelectedIndex()
Get the index of the selected item, or -1. |
void |
remove(ToggleButton button)
Removes a button from the group. |
void |
removeAll()
Removes all of the buttons in the group. |
void |
removeListener(ActionListener listener)
Removes a selection change listener. |
void |
setSelected(ToggleButton button)
Set the selected item. |
void |
setSelectedButton(ToggleButton button)
Deprecated. |
void |
setSelectedIndex(int idx)
Set the index of the selected item. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonGroup(ToggleButton... buttons)
buttons - the buttons in the group.| Method Detail |
|---|
public void addListener(ActionListener listener)
public void removeListener(ActionListener listener)
public void add(ToggleButton button)
public void remove(ToggleButton button)
public void removeAll()
public int getButtonCount()
public ToggleButton getSelected()
Selectable
getSelected in interface Selectable<ToggleButton>public void setSelected(ToggleButton button)
Selectable
setSelected in interface Selectable<ToggleButton>public ToggleButton getButton(int idx)
@Deprecated public void setSelectedButton(ToggleButton button)
@Deprecated public ToggleButton getSelectedButton()
public void setSelectedIndex(int idx)
Selectable
setSelectedIndex in interface Selectable<ToggleButton>public int getSelectedIndex()
Selectable
getSelectedIndex in interface Selectable<ToggleButton>public void actionPerformed(ActionEvent event)
ActionListener
actionPerformed in interface ActionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||