|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.tree.AbstractLayoutCache
javax.swing.tree.VariableHeightLayoutCache
public class VariableHeightLayoutCache
註:在以後的版本中,此類別將變得更加開放。
警告:此類別的已序列化物件與以後的 Swing 版本不相容。當前的序列化支持適用於短期存儲或運行相同 Swing 版本的應用程序之間的 RMI。從 1.4 版本開始,已在 java.beans 套件中添加了支持所有 JavaBeansTM 長期存儲的功能。請參見 XMLEncoder。
| 巢狀類別摘要 |
|---|
| 從類別 javax.swing.tree.AbstractLayoutCache 繼承的巢狀類別/介面 |
|---|
AbstractLayoutCache.NodeDimensions |
| 欄位摘要 |
|---|
| 從類別 javax.swing.tree.AbstractLayoutCache 繼承的欄位 |
|---|
nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel |
| 建構子摘要 | |
|---|---|
VariableHeightLayoutCache()
|
|
| 方法摘要 | |
|---|---|
Rectangle |
getBounds(TreePath path,
Rectangle placeIn)
返回 Rectangle,它包圍在其中繪製 path 標識的項的標籤部分。 |
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)
返回路徑中標識的最後一項在其中可見的行。 |
int |
getVisibleChildCount(TreePath path)
返回 path 的可見子路徑數。 |
Enumeration<TreePath> |
getVisiblePathsFrom(TreePath path)
返回從傳入位置開始的可見路徑的增量的 Enumerator。 |
void |
invalidatePathBounds(TreePath path)
指示 LayoutCache path 的邊界無效,需要更新。 |
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)
階層樹徹底更改給定節點以下的結構之後進行調用。 |
| 從類別 javax.swing.tree.AbstractLayoutCache 繼承的方法 |
|---|
getModel, getNodeDimensions, getNodeDimensions, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setSelectionModel |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public VariableHeightLayoutCache()
| 方法詳細資訊 |
|---|
public void setModel(TreeModel newModel)
TreeModel。
AbstractLayoutCache 中的 setModelnewModel - 將提供資料的 TreeModelpublic void setRootVisible(boolean rootVisible)
TreeModel 的根節點是否可見。
AbstractLayoutCache 中的 setRootVisiblerootVisible - 如果將顯示階層樹的根節點,則為 trueAbstractLayoutCache.rootVisiblepublic void setRowHeight(int rowHeight)
AbstractLayoutCache 中的 setRowHeightrowHeight - 每個單元格的高度(以像素為單位)public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
AbstractLayoutCache 中的 setNodeDimensionsnd - 渲染器
public void setExpandedState(TreePath path,
boolean isExpanded)
path 的擴展狀態標記為 isExpanded。
AbstractLayoutCache 中的 setExpandedStatepath - 相關的 TreePathisExpanded - 如果應擴展路徑,則為 true,否則為 falsepublic boolean getExpandedState(TreePath path)
AbstractLayoutCache 中的 getExpandedStatepath - 正在被查詢的路徑
public Rectangle getBounds(TreePath path,
Rectangle placeIn)
Rectangle,它包圍在其中繪製 path 標識的項的標籤部分。
AbstractLayoutCache 中的 getBoundspath - 要繪製的路徑placeIn - 矩形的邊界
nullpublic TreePath getPathForRow(int row)
row 的路徑。如果 row 不可見,則返回 null。
AbstractLayoutCache 中的 getPathForRowrow - 相關的位置
row 的路徑,如果 row 不可見,則返回 nullpublic int getRowForPath(TreePath path)
AbstractLayoutCache 中的 getRowForPathpath - 相關的 TreePath
public int getRowCount()
AbstractLayoutCache 中的 getRowCountpublic void invalidatePathBounds(TreePath path)
LayoutCache path 的邊界無效,需要更新。
AbstractLayoutCache 中的 invalidatePathBoundspath - 現在無效的 TreePathpublic int getPreferredHeight()
AbstractLayoutCache 中的 getPreferredHeightpublic int getPreferredWidth(Rectangle bounds)
visibleRegion 中區域的首選寬度和高度。
AbstractLayoutCache 中的 getPreferredWidthbounds - 被查詢的區域
public TreePath getPathClosestTo(int x,
int y)
null,否則,始終返回一個有效路徑。如果需要測試返回的物件是否正好位於 x, y,您應獲取返回路徑的邊界,並根據它測試 x, y。
AbstractLayoutCache 中的 getPathClosestTox - x 坐標y - y 坐標
public Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
Enumerator。該列舉的排序基於路徑的顯示方式。
AbstractLayoutCache 中的 getVisiblePathsFrompath - TreePath 的起始位置
Enumeratorpublic int getVisibleChildCount(TreePath path)
path 的可見子路徑數。
AbstractLayoutCache 中的 getVisibleChildCountpath - 正被查詢的路徑
path 的可見子路徑數public void invalidateSizes()
TreeState 需要重新計算它參考的所有大小。
AbstractLayoutCache 中的 invalidateSizespublic boolean isExpanded(TreePath path)
path 標識的值,則返回 true。
AbstractLayoutCache 中的 isExpandedpath 標識的值,則返回 truepublic void treeNodesChanged(TreeModelEvent e)
e.path 返回已更改節點的父節點的路徑。
e.childIndices 返回已更改節點的索引。
AbstractLayoutCache 中的 treeNodesChangede - 相關的 TreeModelEventpublic void treeNodesInserted(TreeModelEvent e)
e.path 返回新節點的父節點。
e.childIndices 按升序返回新節點的索引。
AbstractLayoutCache 中的 treeNodesInsertede - 相關的 TreeModelEventpublic void treeNodesRemoved(TreeModelEvent e)
e.path 返回刪除節點的前一個父節點。
e.childIndices 返回節點按升序刪除之前具有的索引。
AbstractLayoutCache 中的 treeNodesRemovede - 相關的 TreeModelEventpublic void treeStructureChanged(TreeModelEvent e)
e.getPath 返回的路徑長度為一,並且第一個元素不標識當前根節點,則第一個元素應成為階層樹的新根。
e.path 保持節點的路徑。
e.childIndices 返回 null。
AbstractLayoutCache 中的 treeStructureChangede - 相關的 TreeModelEvent
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。