|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.5.0
javax.swing
|
Field Summary | |
---|---|
protected Vector<AbstractButton> |
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<AbstractButton> |
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<AbstractButton> 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<AbstractButton> 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 ButtonModel
b
- true
if this button is to be
selected, otherwise false
public boolean isSelected(ButtonModel m)
ButtonModel
is selected.
true
if the button is selected,
otherwise returns false
public int getButtonCount()