public class VariableHeightLayoutCache extends AbstractLayoutCache
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースとの互換性がなくなる予定です。現在の直列化のサポートは、短期間の格納や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。1.4 以降、すべての JavaBeansTM 用の長期間の格納サポートが java.beans パッケージに追加されています。XMLEncoder を参照してください。
AbstractLayoutCache.NodeDimensionsnodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel| コンストラクタと説明 |
|---|
VariableHeightLayoutCache() |
| 修飾子と型 | メソッドと説明 |
|---|---|
Rectangle |
getBounds(TreePath path, Rectangle placeIn)
path で識別される項目が描画されるラベル部分を囲む Rectangle を返します。 |
boolean |
getExpandedState(TreePath path)
パスが展開されて可視の場合に true を返します。
|
TreePath |
getPathClosestTo(int x, int y)
x、y にもっとも近いノードへのパスを返します。
|
TreePath |
getPathForRow(int row)
row のパスを返します。 |
int |
getPreferredHeight()
推奨する高さを返します。
|
int |
getPreferredWidth(Rectangle bounds)
visibleRegion 内の領域の推奨する幅と高さを返します。 |
int |
getRowCount()
可視行の数を返します。
|
int |
getRowForPath(TreePath path)
path で識別される最後の項目が可視である行を返します。
|
int |
getVisibleChildCount(TreePath path)
path について可視の子の数を返します。 |
Enumeration<TreePath> |
getVisiblePathsFrom(TreePath path)
渡された位置から開始される可視のパスを次々に列挙する
Enumerator を返します。 |
void |
invalidatePathBounds(TreePath path)
path の矩形は無効で、更新される必要があることを LayoutCache に通知します。 |
void |
invalidateSizes()
参照しているすべてのサイズを再計算する必要があることを
TreeState に通知します。 |
boolean |
isExpanded(TreePath path)
path で識別される値が現在展開されている場合に true を返します。 |
void |
setExpandedState(TreePath path, boolean isExpanded)
パス
path の展開状態を isExpanded としてマーク付けします。 |
void |
setModel(TreeModel newModel)
データを提供する
TreeModel を設定します。 |
void |
setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
ツリー内のノードの描画を行うレンダリングを設定します。
|
void |
setRootVisible(boolean rootVisible)
TreeModel のルートノードが可視かどうかを設定します。 |
void |
setRowHeight(int rowHeight)
各セルの高さを設定します。
|
void |
treeNodesChanged(TreeModelEvent e)
ノード (または兄弟のセット) に何らかの変更があったあとに呼び出されます。
|
void |
treeNodesInserted(TreeModelEvent e)
ノードがツリーに挿入されたあとに呼び出されます。
|
void |
treeNodesRemoved(TreeModelEvent e)
ノードがツリーから削除されたあとに呼び出されます。
|
void |
treeStructureChanged(TreeModelEvent e)
指定されたノード以降でツリーの構造が大幅に変更されたあとに呼び出されます。
|
getModel, getNodeDimensions, getNodeDimensions, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setSelectionModelpublic void setModel(TreeModel newModel)
TreeModel を設定します。setModel、クラス: AbstractLayoutCachenewModel - データを提供する TreeModelpublic void setRootVisible(boolean rootVisible)
TreeModel のルートノードが可視かどうかを設定します。setRootVisible、クラス: AbstractLayoutCacherootVisible - ツリーのルートノードが表示される場合は trueAbstractLayoutCache.rootVisiblepublic void setRowHeight(int rowHeight)
setRowHeight、クラス: AbstractLayoutCacherowHeight - 各セルのピクセル単位の高さpublic void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
setNodeDimensions、クラス: AbstractLayoutCachend - レンダリングpublic void setExpandedState(TreePath path, boolean isExpanded)
path の展開状態を isExpanded としてマーク付けします。setExpandedState、クラス: AbstractLayoutCachepath - 対象の TreePathisExpanded - パスを展開する場合は true、そうでない場合は falsepublic boolean getExpandedState(TreePath path)
getExpandedState、クラス: AbstractLayoutCachepath - 照会中のパスpublic Rectangle getBounds(TreePath path, Rectangle placeIn)
path で識別される項目が描画されるラベル部分を囲む Rectangle を返します。getBounds、クラス: AbstractLayoutCachepath - 描画されるパスplaceIn - 取り囲む矩形の境界nullpublic TreePath getPathForRow(int row)
row のパスを返します。row が可視でない場合は、null が返されます。getPathForRow、クラス: AbstractLayoutCacherow - 対象の位置row のパス。row が可視でない場合は nullpublic int getRowForPath(TreePath path)
getRowForPath、クラス: AbstractLayoutCachepath - 対象の TreePathpublic int getRowCount()
getRowCount、クラス: AbstractLayoutCachepublic void invalidatePathBounds(TreePath path)
path の矩形は無効で、更新される必要があることを LayoutCache に通知します。invalidatePathBounds、クラス: AbstractLayoutCachepath - 現在は無効である TreePathpublic int getPreferredHeight()
getPreferredHeight、クラス: AbstractLayoutCachepublic int getPreferredWidth(Rectangle bounds)
visibleRegion 内の領域の推奨する幅と高さを返します。getPreferredWidth、クラス: AbstractLayoutCachebounds - 照会中の領域public TreePath getPathClosestTo(int x, int y)
null を返します。そうでない場合は、常に有効なパスを返します。返されたオブジェクトが正確に x, y にあるかどうかを判定する必要がある場合は、返されたパスの矩形を取得して、x, y と比較するようにしてください。getPathClosestTo、クラス: AbstractLayoutCachex - x 座標y - y 座標public Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
Enumerator を返します。列挙の順序付けはパスの表示方法に基づきます。getVisiblePathsFrom、クラス: AbstractLayoutCachepath - TreePath の開始位置Enumeratorpublic int getVisibleChildCount(TreePath path)
path について可視の子の数を返します。getVisibleChildCount、クラス: AbstractLayoutCachepath - 照会中のパスpath について可視の子の数public void invalidateSizes()
TreeState に通知します。invalidateSizes、クラス: AbstractLayoutCachepublic boolean isExpanded(TreePath path)
path で識別される値が現在展開されている場合に true を返します。isExpanded、クラス: AbstractLayoutCachepath で識別される値が現在展開されている場合は truepublic void treeNodesChanged(TreeModelEvent e)
e.path は、変更されたノードの親をパスに返します。
e.childIndices は、変更されたノードのインデックスを返します。
treeNodesChanged、クラス: AbstractLayoutCachee - 対象の TreeModelEventpublic void treeNodesInserted(TreeModelEvent e)
e.path は、新しいノードの親を返します。
e.childIndices は、新しいノードのインデックスを昇順で返します。
treeNodesInserted、クラス: AbstractLayoutCachee - 対象の TreeModelEventpublic void treeNodesRemoved(TreeModelEvent e)
e.path は、削除されたノードの元の親を返します。
e.childIndices は、ノードが削除される前に持っていたインデックスを昇順で返します。
treeNodesRemoved、クラス: AbstractLayoutCachee - 対象の TreeModelEventpublic void treeStructureChanged(TreeModelEvent e)
e.getPath で返されるパスの長さが 1 で、先頭の要素が現在のルートノードを識別しない場合、先頭の要素がツリーの新しいルートになります。
e.path はノードへのパスを保持します。
e.childIndices は null を返します。
treeStructureChanged、クラス: AbstractLayoutCachee - 対象の TreeModelEvent バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.