public class ButtonGroup extends Object
| Constructor and Description |
|---|
ButtonGroup() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AbstractButton b)
Add a button
|
void |
addItemListener(ItemListener il)
Add the given item listener to listen for button change events from
this button group.
|
void |
clear()
Removes all the buttons being controlled by this button group.
|
protected void |
fireListenerEvent(AbstractButton b)
Fire an itemStateChange event to the item listeners.
|
AbstractButton |
getSelected()
Returns the selected button in the group.
|
void |
remove(AbstractButton b)
Remove the given button from the group.
|
void |
removeItemListener(ItemListener il)
Remove the given item listener from this button group.
|
void |
selectNone()
Sets all buttons in the group to unselected.
|
void |
setSelected(AbstractButton b)
Set the selected button to the given one.
|
public ButtonGroup()
public void add(AbstractButton b)
b - public void remove(AbstractButton b)
b - The button to removepublic AbstractButton getSelected()
public void selectNone()
public void setSelected(AbstractButton b)
b - The button to selectpublic void addItemListener(ItemListener il)
il - the item listenerpublic void removeItemListener(ItemListener il)
il - The item listener to remove.protected void fireListenerEvent(AbstractButton b)
b - The button that was selectedpublic void clear()