|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
固定のインデックスを持つ値のリストを表示するコンポーネントの、現在の選択状態を表します。選択状態は区間のセットとしてモデル化され、各区間は選択されたリスト要素の連続範囲を表します。選択された区間のセットを変更するメソッドはすべて、閉じた区間を表す index0 と index1 を 1 組とするインデックスをとります。つまり、区間には index0 と index1 の両方が含まれます。
DefaultListSelectionModel| フィールドの概要 | |
static int |
MULTIPLE_INTERVAL_SELECTION
selectionMode プロパティの値です。 |
static int |
SINGLE_INTERVAL_SELECTION
selectionMode プロパティの値です。 |
static int |
SINGLE_SELECTION
selectionMode プロパティの値です。 |
| メソッドの概要 | |
void |
addListSelectionListener(ListSelectionListener x)
選択範囲の変更が通知されるリスナーをリストに追加します。 |
void |
addSelectionInterval(int index0,
int index1)
選択範囲を、現在の選択範囲と index0 以上 index1 以下のインデックスの示す範囲との和集合に変更します。 |
void |
clearSelection()
選択範囲を空のセットに変更します。 |
int |
getAnchorSelectionIndex()
setSelectionInterval()、addSelectionInterval()、または removeSelectionInterval() の直前の呼び出しから、最初のインデックス引数を返します。 |
int |
getLeadSelectionIndex()
setSelectionInterval()、addSelectionInterval()、または removeSelectionInterval() の直前の呼び出しから、2 番目のインデックス引数を返します。 |
int |
getMaxSelectionIndex()
最後に選択されたインデックスを返すか、選択範囲が空の場合に -1 を返します。 |
int |
getMinSelectionIndex()
最初に選択されたインデックスを返すか、選択範囲が空の場合に -1 を返します。 |
int |
getSelectionMode()
現在の選択モードを返します。 |
boolean |
getValueIsAdjusting()
値が一連の変更を受けている場合に true を返します。 |
void |
insertIndexInterval(int index,
int length,
boolean before)
index の前/後から始まる length インデックスを挿入します。 |
boolean |
isSelectedIndex(int index)
指定のインデックスが選択されている場合に true を返します。 |
boolean |
isSelectionEmpty()
インデックスが選択されていない場合に true を返します。 |
void |
removeIndexInterval(int index0,
int index1)
選択モデルから、index0 と index1 を両端として含む区間のインデックスを削除します。 |
void |
removeListSelectionListener(ListSelectionListener x)
選択範囲の変更が通知されるリスナーをリストから削除します。 |
void |
removeSelectionInterval(int index0,
int index1)
選択範囲を、現在の選択範囲と index0 以上 index1 以下のインデックスの示す範囲との差集合に変更します。 |
void |
setAnchorSelectionIndex(int index)
選択範囲のアンカーインデックスを設定します。 |
void |
setLeadSelectionIndex(int index)
選択範囲のリードインデックスを設定します。 |
void |
setSelectionInterval(int index0,
int index1)
選択範囲を index0 以上 index1 以下に変更します。 |
void |
setSelectionMode(int selectionMode)
選択モードを設定します。 |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
このプロパティは、モデルの値に適用されつつある変更が単一のイベントと考えられる場合に true になります。 |
| フィールドの詳細 |
public static final int SINGLE_SELECTION
setSelectionMode(int),
定数フィールド値public static final int SINGLE_INTERVAL_SELECTION
setSelectionMode(int),
定数フィールド値public static final int MULTIPLE_INTERVAL_SELECTION
setSelectionMode(int),
定数フィールド値| メソッドの詳細 |
public void setSelectionInterval(int index0,
int index1)
index0 - 区間の一方の端の値index1 - 区間の他方の端の値addListSelectionListener(javax.swing.event.ListSelectionListener)
public void addSelectionInterval(int index0,
int index1)
index0 - 区間の一方の端の値index1 - 区間の他方の端の値addListSelectionListener(javax.swing.event.ListSelectionListener)
public void removeSelectionInterval(int index0,
int index1)
index0 - 区間の一方の端の値index1 - 区間の他方の端の値addListSelectionListener(javax.swing.event.ListSelectionListener)public int getMinSelectionIndex()
public int getMaxSelectionIndex()
public boolean isSelectedIndex(int index)
public int getAnchorSelectionIndex()
getLeadSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int)public void setAnchorSelectionIndex(int index)
getAnchorSelectionIndex()public int getLeadSelectionIndex()
getAnchorSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int)public void setLeadSelectionIndex(int index)
getLeadSelectionIndex()public void clearSelection()
addListSelectionListener(javax.swing.event.ListSelectionListener)public boolean isSelectionEmpty()
public void insertIndexInterval(int index,
int length,
boolean before)
public void removeIndexInterval(int index0,
int index1)
public void setValueIsAdjusting(boolean valueIsAdjusting)
valueIsAdjusting - プロパティの新しい値getValueIsAdjusting()public boolean getValueIsAdjusting()
setValueIsAdjusting(boolean)public void setSelectionMode(int selectionMode)
SINGLE_SELECTION リストインデックスを 1 回に 1 つだけ選択できる。このモードでは、setSelectionInterval メソッドと addSelectionInterval メソッドは同等で、2 番目のインデックス引数 (「リードインデックス」) だけが使用される。
SINGLE_INTERVAL_SELECTION 連続するインデックス区間を 1 回に 1 つ選択できる。このモードでは、setSelectionInterval メソッドと addSelectionInterval メソッドは同等。
MULTIPLE_INTERVAL_SELECTION このモードでは、選択対象に制限はない。
getSelectionMode()public int getSelectionMode()
setSelectionMode(int)public void addListSelectionListener(ListSelectionListener x)
removeListSelectionListener(javax.swing.event.ListSelectionListener),
setSelectionInterval(int, int),
addSelectionInterval(int, int),
removeSelectionInterval(int, int),
clearSelection(),
insertIndexInterval(int, int, boolean),
removeIndexInterval(int, int)public void removeListSelectionListener(ListSelectionListener x)
addListSelectionListener(javax.swing.event.ListSelectionListener)
|
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.