java.lang.Object | +--com.sun.kjava.RadioGroup
RadioButton のグループを表すオブジェクトです。一度に選択できるのは、RadioGroup 内の 1 つの RadioButton だけです。
RadioButton
コンストラクタの概要 | |
RadioGroup(int numButtons)
新しい RadioGroup を作成します。 |
メソッドの概要 | |
void |
add(RadioButton theButton)
RadioGroup に RadioButton を追加します。 |
RadioButton |
buttonAt(int i)
指定されたインデックスの RadioButton を取得します。 |
RadioButton |
getSelected()
現在選択されている RadioButton を取得します。 |
boolean |
hasSelection()
グループ内の RadioButton のどれかが選択されているかどうかを判定します。 |
void |
setSelected(RadioButton theButton)
現在選択されている RadioButton を設定します。 |
int |
size()
このグループ内にある RadioButton の数を返します。 |
クラス java.lang.Object から継承したメソッド |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
コンストラクタの詳細 |
public RadioGroup(int numButtons)
numButtons
- 包含する RadioButton の数メソッドの詳細 |
public void add(RadioButton theButton)
theButton
- 追加する RadioButtonpublic RadioButton buttonAt(int i)
i
- 返される RadioButton のインデックスpublic void setSelected(RadioButton theButton)
theButton
- 選択する RadioButtonpublic RadioButton getSelected()
public boolean hasSelection()
public int size()