|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Object | +--javax.security.auth.callback.ChoiceCallback
ChoiceCallback を基本セキュリティサービスでインスタンス化して CallbackHandler の invokeCallback メソッドに渡し、選択リストを表示し、選択した選択肢を検出します。
CallbackHandler,
直列化された形式| コンストラクタの概要 | |
ChoiceCallback(String prompt,
String[] choices,
int defaultChoice,
boolean multipleSelectionsAllowed)
プロンプト、選択肢のリスト、デフォルト選択、および選択リストで複数選択が可能かどうかを表すブール値を使用して、 ChoiceCallback を構築します。
|
|
| メソッドの概要 | |
boolean |
allowMultipleSelections()
choices リストで複数選択が可能かどうかを意味するブール値を取得します。
|
String[] |
getChoices()
選択肢のリストを取得します。 |
int |
getDefaultChoice()
defaultChoice を取得します。 |
String |
getPrompt()
プロンプトを取得します。 |
int[] |
getSelectedIndexes()
選択した選択肢を取得します。 |
void |
setSelectedIndex(int selection)
選択した選択肢 (1 つ) を設定します。 |
void |
setSelectedIndexes(int[] selections)
選択した選択肢 (複数) を設定します。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public ChoiceCallback(String prompt,
String[] choices,
int defaultChoice,
boolean multipleSelectionsAllowed)
ChoiceCallback を構築します。
prompt - 選択肢のリストの記述に使用するプロンプト
choices - 選択肢のリスト
defaultChoice - 選択肢のリストが表示されたときにデフォルトの選択肢として使用される選択肢。この値は choices 配列のインデックスとして表される
multipleSelectionsAllowed - 選択肢のリストで複数選択が可能かどうかを指定するブール値
IllegalArgumentException - prompt が null の場合、prompt の長さが 0 の場合、choices が null の場合、choices の長さが 0 の場合、choices の要素に null がある場合、choices の要素のどれかが長さ 0 である場合、あるいは defaultChoice が choices の配列範囲内にない場合| メソッドの詳細 |
public String getPrompt()
public String[] getChoices()
public int getDefaultChoice()
choices リストのインデックスとして表される defaultChoicepublic boolean allowMultipleSelections()
choices リストで複数選択が可能かどうかを意味するブール値を取得します。
public void setSelectedIndex(int selection)
selection - choices リストのインデックスとして表される選択内容 (1 つ)getSelectedIndexes()public void setSelectedIndexes(int[] selections)
selections - choices リストのインデックスとして表される選択内容 (複数)
UnsupportedOperationException - 複数選択ができない場合。これは allowMultipleSelections の値で表されるgetSelectedIndexes()public int[] getSelectedIndexes()
choices リストのインデックスとして表されるsetSelectedIndexes(int[])
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.