|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.AbstractLayoutCache
public abstract class AbstractLayoutCache
class AbstractLayoutCache
| Nested Class Summary | |
|---|---|
static class |
AbstractLayoutCache.NodeDimensions
class NodeDimensions |
| Field Summary | |
|---|---|
protected AbstractLayoutCache.NodeDimensions |
nodeDimensions
nodeDimensions |
protected boolean |
rootVisible
rootVisible |
protected int |
rowHeight
rowHeight |
protected TreeModel |
treeModel
treeModel |
protected TreeSelectionModel |
treeSelectionModel
treeSelectionModel |
| Constructor Summary | |
|---|---|
AbstractLayoutCache()
Constructor AbstractLayoutCache |
|
| Method Summary | |
|---|---|
abstract Rectangle |
getBounds(TreePath value0,
Rectangle value1)
getBounds |
abstract boolean |
getExpandedState(TreePath path)
getExpandedState |
TreeModel |
getModel()
Returns the model that provides the tree data. |
AbstractLayoutCache.NodeDimensions |
getNodeDimensions()
getNodeDimensions |
protected Rectangle |
getNodeDimensions(Object value,
int row,
int depth,
boolean expanded,
Rectangle bounds)
Get the node dimensions. |
abstract TreePath |
getPathClosestTo(int value0,
int value1)
getPathClosestTo |
abstract TreePath |
getPathForRow(int row)
getPathForRow |
int |
getPreferredHeight()
Get the sum of heights for all rows. |
int |
getPreferredWidth(Rectangle rect)
Get the maximal width. |
abstract int |
getRowCount()
getRowCount |
abstract int |
getRowForPath(TreePath path)
getRowForPath |
int |
getRowHeight()
getRowHeight |
int[] |
getRowsForPaths(TreePath[] paths)
Get the tree row numbers for the given pathes. |
TreeSelectionModel |
getSelectionModel()
getSelectionModel |
abstract int |
getVisibleChildCount(TreePath path)
getVisibleChildCount |
abstract Enumeration<TreePath> |
getVisiblePathsFrom(TreePath path)
getVisiblePathsFrom |
abstract void |
invalidatePathBounds(TreePath path)
invalidatePathBounds |
abstract void |
invalidateSizes()
invalidateSizes |
abstract boolean |
isExpanded(TreePath value0)
isExpanded |
protected boolean |
isFixedRowHeight()
Returns true if this layout supposes that all rows have the fixed height. |
boolean |
isRootVisible()
isRootVisible |
abstract void |
setExpandedState(TreePath value0,
boolean value1)
setExpandedState |
void |
setModel(TreeModel model)
Sets the model that provides the tree data. |
void |
setNodeDimensions(AbstractLayoutCache.NodeDimensions dimensions)
setNodeDimensions |
void |
setRootVisible(boolean visible)
setRootVisible |
void |
setRowHeight(int height)
setRowHeight |
void |
setSelectionModel(TreeSelectionModel model)
setSelectionModel |
abstract void |
treeNodesChanged(TreeModelEvent event)
treeNodesChanged |
abstract void |
treeNodesInserted(TreeModelEvent event)
treeNodesInserted |
abstract void |
treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved |
abstract void |
treeStructureChanged(TreeModelEvent event)
treeStructureChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractLayoutCache.NodeDimensions nodeDimensions
protected TreeModel treeModel
protected TreeSelectionModel treeSelectionModel
protected boolean rootVisible
protected int rowHeight
| Constructor Detail |
|---|
public AbstractLayoutCache()
| Method Detail |
|---|
public void setNodeDimensions(AbstractLayoutCache.NodeDimensions dimensions)
dimensions - TODOpublic AbstractLayoutCache.NodeDimensions getNodeDimensions()
protected Rectangle getNodeDimensions(Object value,
int row,
int depth,
boolean expanded,
Rectangle bounds)
FixedHeightLayoutCache. If the method is not overridden and
the property is not set, the InternalError is thrown.
value - the last node in the pathrow - the node rowdepth - the indentation depthexpanded - true if this node is expanded, false otherwisebounds - the area where the tree is displayedpublic void setModel(TreeModel model)
model - the modelpublic TreeModel getModel()
public void setRootVisible(boolean visible)
visible - true if root should be visible,
false otherwisepublic boolean isRootVisible()
true if root is visible,
false otherwisepublic void setRowHeight(int height)
height - the row heightpublic int getRowHeight()
public void setSelectionModel(TreeSelectionModel model)
model - the modelpublic TreeSelectionModel getSelectionModel()
public int getPreferredHeight()
VariableHeightLayoutCache, FixedHeightLayoutCache) for
the better performance.
public int getPreferredWidth(Rectangle rect)
VariableHeightLayoutCache, FixedHeightLayoutCache) for
the better performance.
rect - the rectangle that is used during the method workpublic abstract boolean isExpanded(TreePath value0)
value0 - TODO
public abstract Rectangle getBounds(TreePath value0,
Rectangle value1)
value0 - TODOvalue1 - TODO
public abstract TreePath getPathForRow(int row)
row - the row
public abstract int getRowForPath(TreePath path)
path - the tree path
public abstract TreePath getPathClosestTo(int value0,
int value1)
value0 - TODOvalue1 - TODO
public abstract Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
path - the tree path
public abstract int getVisibleChildCount(TreePath path)
path - the tree path
public abstract void setExpandedState(TreePath value0,
boolean value1)
value0 - TODOvalue1 - TODOpublic abstract boolean getExpandedState(TreePath path)
path - the tree path
public abstract int getRowCount()
public abstract void invalidateSizes()
public abstract void invalidatePathBounds(TreePath path)
path - the tree pathpublic abstract void treeNodesChanged(TreeModelEvent event)
event - the event to sendpublic abstract void treeNodesInserted(TreeModelEvent event)
event - the event to sendpublic abstract void treeNodesRemoved(TreeModelEvent event)
event - the event to sendpublic abstract void treeStructureChanged(TreeModelEvent event)
event - the event to sendpublic int[] getRowsForPaths(TreePath[] paths)
getRowForPath(TreePath).
getRowsForPaths in interface RowMapperpaths - the tree paths the array of the tree pathes.
protected boolean isFixedRowHeight()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||