AbstractLayoutCache (Java SE 11 & JDK 11 ) (original) (raw)
Modifier and Type
Method
Description
abstract [Rectangle](../../../java/awt/Rectangle.html "class in java.awt")
[getBounds](#getBounds%28javax.swing.tree.TreePath,java.awt.Rectangle%29)([TreePath](TreePath.html "class in javax.swing.tree") path,[Rectangle](../../../java/awt/Rectangle.html "class in java.awt") placeIn)
Returns a rectangle giving the bounds needed to draw path.
abstract boolean
[getExpandedState](#getExpandedState%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Returns true if the path is expanded, and visible.
[TreeModel](TreeModel.html "interface in javax.swing.tree")
[getModel](#getModel%28%29)()
Returns the TreeModel
that is providing the data.
[AbstractLayoutCache.NodeDimensions](AbstractLayoutCache.NodeDimensions.html "class in javax.swing.tree")
[getNodeDimensions](#getNodeDimensions%28%29)()
Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
protected [Rectangle](../../../java/awt/Rectangle.html "class in java.awt")
[getNodeDimensions](#getNodeDimensions%28java.lang.Object,int,int,boolean,java.awt.Rectangle%29)([Object](../../../../java.base/java/lang/Object.html "class in java.lang") value, int row, int depth, boolean expanded,[Rectangle](../../../java/awt/Rectangle.html "class in java.awt") placeIn)
Returns, by reference in placeIn
, the size needed to represent value
.
abstract [TreePath](TreePath.html "class in javax.swing.tree")
[getPathClosestTo](#getPathClosestTo%28int,int%29)(int x, int y)
Returns the path to the node that is closest to x,y.
abstract [TreePath](TreePath.html "class in javax.swing.tree")
[getPathForRow](#getPathForRow%28int%29)(int row)
Returns the path for passed in row.
int
[getPreferredHeight](#getPreferredHeight%28%29)()
Returns the preferred height.
int
[getPreferredWidth](#getPreferredWidth%28java.awt.Rectangle%29)([Rectangle](../../../java/awt/Rectangle.html "class in java.awt") bounds)
Returns the preferred width for the passed in region.
abstract int
[getRowCount](#getRowCount%28%29)()
Number of rows being displayed.
abstract int
[getRowForPath](#getRowForPath%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Returns the row that the last item identified in path is visible at.
int
[getRowHeight](#getRowHeight%28%29)()
Returns the height of each row.
int[]
[getRowsForPaths](#getRowsForPaths%28javax.swing.tree.TreePath%5B%5D%29)([TreePath](TreePath.html "class in javax.swing.tree")[] paths)
Returns the rows that the TreePath
instances inpath
are being displayed at.
[TreeSelectionModel](TreeSelectionModel.html "interface in javax.swing.tree")
[getSelectionModel](#getSelectionModel%28%29)()
Returns the model used to maintain the selection.
abstract int
[getVisibleChildCount](#getVisibleChildCount%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Returns the number of visible children for row.
abstract [Enumeration](../../../../java.base/java/util/Enumeration.html "interface in java.util")<[TreePath](TreePath.html "class in javax.swing.tree")>
[getVisiblePathsFrom](#getVisiblePathsFrom%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Returns an Enumerator
that increments over the visible paths starting at the passed in location.
abstract void
[invalidatePathBounds](#invalidatePathBounds%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Instructs the LayoutCache
that the bounds forpath
are invalid, and need to be updated.
abstract void
[invalidateSizes](#invalidateSizes%28%29)()
Informs the TreeState
that it needs to recalculate all the sizes it is referencing.
abstract boolean
[isExpanded](#isExpanded%28javax.swing.tree.TreePath%29)([TreePath](TreePath.html "class in javax.swing.tree") path)
Returns true if the value identified by row is currently expanded.
protected boolean
[isFixedRowHeight](#isFixedRowHeight%28%29)()
Returns true if the height of each row is a fixed size.
boolean
[isRootVisible](#isRootVisible%28%29)()
Returns true if the root node of the tree is displayed.
abstract void
[setExpandedState](#setExpandedState%28javax.swing.tree.TreePath,boolean%29)([TreePath](TreePath.html "class in javax.swing.tree") path, boolean isExpanded)
Marks the path path
expanded state toisExpanded
.
void
[setModel](#setModel%28javax.swing.tree.TreeModel%29)([TreeModel](TreeModel.html "interface in javax.swing.tree") newModel)
Sets the TreeModel
that will provide the data.
void
[setNodeDimensions](#setNodeDimensions%28javax.swing.tree.AbstractLayoutCache.NodeDimensions%29)([AbstractLayoutCache.NodeDimensions](AbstractLayoutCache.NodeDimensions.html "class in javax.swing.tree") nd)
Sets the renderer that is responsible for drawing nodes in the tree and which is therefore responsible for calculating the dimensions of individual nodes.
void
[setRootVisible](#setRootVisible%28boolean%29)(boolean rootVisible)
Determines whether or not the root node from the TreeModel
is visible.
void
[setRowHeight](#setRowHeight%28int%29)(int rowHeight)
Sets the height of each cell.
void
[setSelectionModel](#setSelectionModel%28javax.swing.tree.TreeSelectionModel%29)([TreeSelectionModel](TreeSelectionModel.html "interface in javax.swing.tree") newLSM)
Sets the TreeSelectionModel
used to manage the selection to new LSM.
abstract void
[treeNodesChanged](#treeNodesChanged%28javax.swing.event.TreeModelEvent%29)([TreeModelEvent](../event/TreeModelEvent.html "class in javax.swing.event") e)
Invoked after a node (or a set of siblings) has changed in some way.
abstract void
[treeNodesInserted](#treeNodesInserted%28javax.swing.event.TreeModelEvent%29)([TreeModelEvent](../event/TreeModelEvent.html "class in javax.swing.event") e)
Invoked after nodes have been inserted into the tree.
abstract void
[treeNodesRemoved](#treeNodesRemoved%28javax.swing.event.TreeModelEvent%29)([TreeModelEvent](../event/TreeModelEvent.html "class in javax.swing.event") e)
Invoked after nodes have been removed from the tree.
abstract void
[treeStructureChanged](#treeStructureChanged%28javax.swing.event.TreeModelEvent%29)([TreeModelEvent](../event/TreeModelEvent.html "class in javax.swing.event") e)
Invoked after the tree has drastically changed structure from a given node down.