public class SplitButtonGroup extends ButtonGroup
buttons
Constructor and Description |
---|
SplitButtonGroup()
Creates a new
ButtonGroup . |
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractButton b)
Adds the button to the group.
|
boolean |
isSelected(ButtonModel m)
Returns whether a
ButtonModel is selected. |
void |
remove(AbstractButton b)
Removes the button from the group.
|
void |
setSelected(ButtonModel m,
boolean b)
Sets the selected value for the
ButtonModel . |
clearSelection, getButtonCount, getElements, getSelection
public void add(AbstractButton b)
add
in class ButtonGroup
b
- the button to be addedpublic void remove(AbstractButton b)
remove
in class ButtonGroup
b
- the button to be removedpublic void setSelected(ButtonModel m, boolean b)
ButtonModel
.
Only one button in the group may be selected at a time.setSelected
in class ButtonGroup
m
- the ButtonModel
b
- true
if this button is to be
selected, otherwise false
public boolean isSelected(ButtonModel m)
ButtonModel
is selected.isSelected
in class ButtonGroup
true
if the button is selected,
otherwise returns false