|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.4.2
javax.swing
|
||||||||||||||||||||||||||||
| Field Summary | |
protected Vector |
buttons
|
| Constructor Summary | |
ButtonGroup()
Creates a new ButtonGroup. |
|
| Method Summary | |
void |
add(AbstractButton b)
Adds the button to the group. |
int |
getButtonCount()
Returns the number of buttons in the group. |
Enumeration |
getElements()
Returns all the buttons that are participating in this group. |
ButtonModel |
getSelection()
Returns the model of the selected button. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector buttons
| Constructor Detail |
public ButtonGroup()
ButtonGroup.
| Method Detail |
public void add(AbstractButton b)
b - the button to be addedpublic void remove(AbstractButton b)
b - the button to be removedpublic Enumeration getElements()
Enumeration of the buttons in this grouppublic ButtonModel getSelection()
public void setSelected(ButtonModel m, boolean b)
ButtonModel.
Only one button in the group may be selected at a time.
m - the ButtonModelb - true if this button is to be
selected, otherwise falsepublic boolean isSelected(ButtonModel m)
ButtonModel is selected.
true if the button is selected,
otherwise returns falsepublic int getButtonCount()