The canCheck(Button, boolean) method can be overridden to control if a button check or uncheck is allowed.
| Modifier and Type | Field and Description |
|---|---|
| private final Array | |
| private Array | |
| private T | |
| private int | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| protected boolean | Returns: True if the new state should be allowed.Called when a button is checked or unchecked. |
| public void | |
| public Array | |
| public Array | |
| public T | |
| public int | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public 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. |
| public void |
| buttons | back to summary |
|---|---|
| private final Array<T> buttons | |
| checkedButtons | back to summary |
|---|---|
| private Array<T> checkedButtons | |
| lastChecked | back to summary |
|---|---|
| private T lastChecked | |
| maxCheckCount | back to summary |
|---|---|
| private int maxCheckCount | |
| minCheckCount | back to summary |
|---|---|
| private int minCheckCount | |
| uncheckLast | back to summary |
|---|---|
| private boolean uncheckLast | |
| ButtonGroup | back to summary |
|---|---|
| public ButtonGroup() | |
| ButtonGroup | back to summary |
|---|---|
| public ButtonGroup(T... buttons) | |
| add | back to summary |
|---|---|
| public void add(T button) | |
| add | back to summary |
|---|---|
| public void add(T... buttons) | |
| canCheck | back to summary |
|---|---|
| protected boolean canCheck(T button, boolean newState) Called when a button is checked or unchecked. If overridden, generally changing button checked states should not be done from within this method.
| |
| clear | back to summary |
|---|---|
| public void clear() | |
| getAllChecked | back to summary |
|---|---|
| public Array | |
| getButtons | back to summary |
|---|---|
| public Array | |
| getChecked | back to summary |
|---|---|
public T getChecked()
| |
| getCheckedIndex | back to summary |
|---|---|
public int getCheckedIndex()
| |
| remove | back to summary |
|---|---|
| public void remove(T button) | |
| remove | back to summary |
|---|---|
| public void remove(T... buttons) | |
| setChecked | back to summary |
|---|---|
| public void setChecked(String text) Sets the first | |
| setMaxCheckCount | back to summary |
|---|---|
| public void setMaxCheckCount(int maxCheckCount) Sets the maximum number of buttons that can be checked. Set to -1 for no maximum. Default is 1. | |
| setMinCheckCount | back to summary |
|---|---|
| public void setMinCheckCount(int minCheckCount) Sets the minimum number of buttons that must be checked. Default is 1. | |
| setUncheckLast | back to summary |
|---|---|
| public 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. If false, additional buttons beyond the maximum are not allowed to be checked. Default is true. | |
| uncheckAll | back to summary |
|---|---|
| public void uncheckAll() Sets all buttons' | |