|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.tree.AbstractLayoutCache
javax.swing.tree.FixedHeightLayoutCache
public class FixedHeightLayoutCache
註:在以後的版本中,這將變得更加開放。
警告:此類別的已序列化物件與以後的 Swing 版本不相容。當前的序列化支持適用於短期存儲或運行相同 Swing 版本的應用程序之間的 RMI。從 1.4 版本開始,已在 java.beans 套件中添加了支持所有 JavaBeansTM 長期存儲的功能。請參見 XMLEncoder。
| 巢狀類別摘要 |
|---|
| 從類別 javax.swing.tree.AbstractLayoutCache 繼承的巢狀類別/介面 |
|---|
AbstractLayoutCache.NodeDimensions |
| 欄位摘要 |
|---|
| 從類別 javax.swing.tree.AbstractLayoutCache 繼承的欄位 |
|---|
nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel |
| 建構子摘要 | |
|---|---|
FixedHeightLayoutCache()
|
|
| 方法摘要 | |
|---|---|
Rectangle |
getBounds(TreePath path,
Rectangle placeIn)
返回給出繪製路徑所需邊界的矩形。 |
boolean |
getExpandedState(TreePath path)
如果該路徑已擴展,並且可見,則返回 true。 |
TreePath |
getPathClosestTo(int x,
int y)
返回最接近 x,y 的節點的路徑。 |
TreePath |
getPathForRow(int row)
返回傳入行的路徑。 |
int |
getRowCount()
返回可視的行數。 |
int |
getRowForPath(TreePath path)
返回路徑中標識的最後一項可見的行。 |
int |
getVisibleChildCount(TreePath path)
返回行的可見子物件數。 |
Enumeration<TreePath> |
getVisiblePathsFrom(TreePath path)
返回表示從傳入位置開始的可見路徑的增量的 Enumerator。 |
void |
invalidatePathBounds(TreePath path)
不執行任何操作,FixedHeightLayoutCache 不快取記憶體寬度(即所有可以更改的寬度)。 |
void |
invalidateSizes()
通知 TreeState 需要重新計算它參考的所有大小。 |
boolean |
isExpanded(TreePath path)
如果當前擴展了由行標識的值,則返回 true。 |
void |
setExpandedState(TreePath path,
boolean isExpanded)
將路徑 path 的擴展狀態標記為 isExpanded。 |
void |
setModel(TreeModel newModel)
設置將提供資料的 TreeModel。 |
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)
階層樹徹底更改給定節點以下的結構之後進行調用。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public FixedHeightLayoutCache()
| 方法詳細資訊 |
|---|
public void setModel(TreeModel newModel)
AbstractLayoutCache 中的 setModelnewModel - 將提供資料的 TreeModelpublic void setRootVisible(boolean rootVisible)
AbstractLayoutCache 中的 setRootVisiblerootVisible - 如果將顯示階層樹的根節點,則為 trueAbstractLayoutCache.rootVisiblepublic void setRowHeight(int rowHeight)
AbstractLayoutCache 中的 setRowHeightrowHeight - 每個單元格的高度(以像素為單位)public int getRowCount()
AbstractLayoutCache 中的 getRowCountpublic void invalidatePathBounds(TreePath path)
AbstractLayoutCache 中的 invalidatePathBoundspath - 正在被更新的路徑public void invalidateSizes()
AbstractLayoutCache 中的 invalidateSizespublic boolean isExpanded(TreePath path)
AbstractLayoutCache 中的 isExpanded
public Rectangle getBounds(TreePath path,
Rectangle placeIn)
AbstractLayoutCache 中的 getBoundspath - 指定節點的 TreePathplaceIn - 提供可用空間的 Rectangle 物件
public TreePath getPathForRow(int row)
AbstractLayoutCache 中的 getPathForRowrow - 查詢的行
TreePathpublic int getRowForPath(TreePath path)
AbstractLayoutCache 中的 getRowForPathpath - 查詢的 TreePath
public TreePath getPathClosestTo(int x,
int y)
AbstractLayoutCache 中的 getPathClosestTox - 所需位置的水平元件y - 所需位置的垂直元件
TreePathpublic int getVisibleChildCount(TreePath path)
AbstractLayoutCache 中的 getVisibleChildCountpath - 正被查詢的路徑
public Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
AbstractLayoutCache 中的 getVisiblePathsFrompath - 列舉的起始位置
Enumerator
public void setExpandedState(TreePath path,
boolean isExpanded)
path 的擴展狀態標記為 isExpanded。
AbstractLayoutCache 中的 setExpandedStatepath - 正在被擴展或折疊的路徑isExpanded - 如果應該擴展路徑,則為 true,否則為 falsepublic boolean getExpandedState(TreePath path)
AbstractLayoutCache 中的 getExpandedStatepath - 正在被查詢的路徑
public 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。