|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.ui.ButtonGroup
public class ButtonGroup
Manages a group of buttons to enforce a minimum and maximum number of checked buttons. This enables "radio button" functionality and more. A button may only be in one group at a time.
Constructor Summary | |
---|---|
ButtonGroup()
|
|
ButtonGroup(Button... buttons)
|
Method Summary | |
---|---|
void |
add(Button... buttons)
|
void |
add(Button button)
|
Array<Button> |
getAllChecked()
|
Array<Button> |
getButtons()
|
Button |
getChecked()
|
void |
remove(Button... buttons)
|
void |
remove(Button button)
|
void |
setChecked(String text)
Sets the first TextButton with the specified text to checked. |
void |
setMaxCheckCount(int maxCheckCount)
Sets the maximum number of buttons that can be checked. |
void |
setMinCheckCount(int minCheckCount)
Sets the minimum number of buttons that must be checked. |
void |
setUncheckLast(boolean uncheckLast)
If true, when the maximum number of buttons are checked and an additional button is checked, the last button to be checked is unchecked so that the maximum is not exceeded. |
void |
uncheckAll()
Sets all buttons' Button.isChecked() to false, regardless of setMinCheckCount(int) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ButtonGroup()
public ButtonGroup(Button... buttons)
Method Detail |
---|
public void add(Button button)
public void add(Button... buttons)
public void remove(Button button)
public void remove(Button... buttons)
public void setChecked(String text)
TextButton
with the specified text to checked.
public void uncheckAll()
Button.isChecked()
to false, regardless of setMinCheckCount(int)
.
public Button getChecked()
public Array<Button> getAllChecked()
public Array<Button> getButtons()
public void setMinCheckCount(int minCheckCount)
public void setMaxCheckCount(int maxCheckCount)
public void setUncheckLast(boolean uncheckLast)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |