| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.util.EventObject
javax.swing.event.TreeSelectionEvent
public class TreeSelectionEvent
現在の選択範囲での変更を記述するイベントです。変更はパスの数に基づきます。TreeSelectionListener は、通常、イベントのソースに対して、変更された可能性のある各行の新しく選択された状態を問い合わせます。
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK Version 1.4 以降、すべての JavaBeans™ の長期間の運用サポートは、java.beans パッケージに追加されています。詳細は、XMLEncoder を参照してください。
TreeSelectionListener, 
TreeSelectionModel| フィールドの概要 | |
|---|---|
| protected  boolean[] | areNew各パスについて、そのパスが実際に新しいパスかどうかを示します。 | 
| protected  TreePath | newLeadSelectionPathパスが変更されたあとの leadSelectionPath です。 | 
| protected  TreePath | oldLeadSelectionPathパスが変更される前の leadSelectionPath です。 | 
| protected  TreePath[] | pathsこのイベントが表すパスです。 | 
| クラス java.util.EventObject から継承されたフィールド | 
|---|
| source | 
| コンストラクタの概要 | |
|---|---|
| TreeSelectionEvent(Object source,
                   TreePath[] paths,
                   boolean[] areNew,
                   TreePath oldLeadSelectionPath,
                   TreePath newLeadSelectionPath)TreeSelectionModel の選択範囲内での変更を表します。 | |
| TreeSelectionEvent(Object source,
                   TreePath path,
                   boolean isNew,
                   TreePath oldLeadSelectionPath,
                   TreePath newLeadSelectionPath)TreeSelectionModel の選択範囲内での変更を表します。 | |
| メソッドの概要 | |
|---|---|
|  Object | cloneWithSource(Object newSource)レシーバのコピーを返します。 | 
|  TreePath | getNewLeadSelectionPath()現在のリードパスを返します。 | 
|  TreePath | getOldLeadSelectionPath()以前にリードパスだったパスを返します。 | 
|  TreePath | getPath()最初のパス要素を返します。 | 
|  TreePath[] | getPaths()選択範囲で追加または削除されたパスを返します。 | 
|  boolean | isAddedPath()最初のパス要素が選択範囲に追加された場合は true を返します。 | 
|  boolean | isAddedPath(int index)indexで指定されるパスが選択範囲に追加された場合は true を返します。 | 
|  boolean | isAddedPath(TreePath path)path で指定されるパスが選択範囲に追加された場合は true を返します。 | 
| クラス java.util.EventObject から継承されたメソッド | 
|---|
| getSource, toString | 
| クラス java.lang.Object から継承されたメソッド | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| フィールドの詳細 | 
|---|
protected TreePath[] paths
protected boolean[] areNew
protected TreePath oldLeadSelectionPath
protected TreePath newLeadSelectionPath
| コンストラクタの詳細 | 
|---|
public TreeSelectionEvent(Object source,
                          TreePath[] paths,
                          boolean[] areNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
source - イベントのソースpaths - 選択範囲で変更されたパス
public TreeSelectionEvent(Object source,
                          TreePath path,
                          boolean isNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
source - イベントのソースpath - 選択範囲で変更されたパスisNew - パスが選択範囲にとって新しいかどうか。 パスが選択範囲から削除された場合は false| メソッドの詳細 | 
|---|
public TreePath[] getPaths()
public TreePath getPath()
public boolean isAddedPath()
public boolean isAddedPath(TreePath path)
public boolean isAddedPath(int index)
index で指定されるパスが選択範囲に追加された場合は true を返します。戻り値 false は、そのパスが以前は選択範囲内にあったが、現在はないことを意味します。このイベントは、index < 0 または >= getPaths.length の場合に生成されます。
public TreePath getOldLeadSelectionPath()
public TreePath getNewLeadSelectionPath()
public Object cloneWithSource(Object newSource)
| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。