public class VariableHeightLayoutCache extends AbstractLayoutCache
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans
package.
Please see XMLEncoder
.
AbstractLayoutCache.NodeDimensions
nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel
Constructor | Description |
---|---|
VariableHeightLayoutCache() |
Modifier and Type | Method | Description |
---|---|---|
Rectangle |
getBounds(TreePath path,
Rectangle placeIn) |
Returns the
Rectangle enclosing the label portion
into which the item identified by path will be drawn. |
boolean |
getExpandedState(TreePath path) |
Returns true if the path is expanded, and visible.
|
TreePath |
getPathClosestTo(int x,
int y) |
Returns the path to the node that is closest to x,y.
|
TreePath |
getPathForRow(int row) |
Returns the path for
row . |
int |
getPreferredHeight() |
Returns the preferred height.
|
int |
getPreferredWidth(Rectangle bounds) |
Returns the preferred width and height for the region in
visibleRegion . |
int |
getRowCount() |
Returns the number of visible rows.
|
int |
getRowForPath(TreePath path) |
Returns the row where the last item identified in path is visible.
|
int |
getVisibleChildCount(TreePath path) |
Returns the number of visible children for
path . |
Enumeration<TreePath> |
getVisiblePathsFrom(TreePath path) |
Returns an
Enumerator that increments over the visible paths
starting at the passed in location. |
void |
invalidatePathBounds(TreePath path) |
Instructs the
LayoutCache that the bounds for
path are invalid, and need to be updated. |
void |
invalidateSizes() |
Informs the
TreeState that it needs to recalculate
all the sizes it is referencing. |
boolean |
isExpanded(TreePath path) |
Returns true if the value identified by
path is
currently expanded. |
void |
setExpandedState(TreePath path,
boolean isExpanded) |
Marks the path
path expanded state to
isExpanded . |
void |
setModel(TreeModel newModel) |
Sets the
TreeModel that will provide the data. |
void |
setNodeDimensions(AbstractLayoutCache.NodeDimensions nd) |
Sets the renderer that is responsible for drawing nodes in the tree.
|
void |
setRootVisible(boolean rootVisible) |
Determines whether or not the root node from
the
TreeModel is visible. |
void |
setRowHeight(int rowHeight) |
Sets the height of each cell.
|
void |
treeNodesChanged(TreeModelEvent e) |
Invoked after a node (or a set of siblings) has changed in some
way.
|
void |
treeNodesInserted(TreeModelEvent e) |
Invoked after nodes have been inserted into the tree.
|
void |
treeNodesRemoved(TreeModelEvent e) |
Invoked after nodes have been removed from the tree.
|
void |
treeStructureChanged(TreeModelEvent e) |
Invoked after the tree has drastically changed structure from a
given node down.
|
getModel, getNodeDimensions, getNodeDimensions, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setSelectionModel