javax.swing.tree
public class FixedHeightLayoutCache extends VariableHeightLayoutCache
Constructor Summary | |
---|---|
FixedHeightLayoutCache()
Creates the unitialised instance. |
Method Summary | |
---|---|
Rectangle | getBounds(TreePath path, Rectangle rect)
Get bounds for the given tree path.
|
boolean | getExpandedState(TreePath path)
Return the expansion state of the given tree path. |
TreePath | getPathClosestTo(int x, int y)
Get the path, closest to the given point.
|
TreePath | getPathForRow(int row)
Get the path, the last element of that is displayed in the given row.
|
int | getPreferredHeight()
Get the sum of heights for all rows. |
int | getPreferredWidth(Rectangle value)
Get the maximal width. |
int | getRowCount()
Get the total number of rows in the tree. |
int | getRowForPath(TreePath path)
Get the row, displaying the last node of the given path.
|
int | getVisibleChildCount(TreePath path)
Get the number of the visible childs for the given tree path. |
Enumeration<TreePath> | getVisiblePathsFrom(TreePath parentPath)
Get the enumeration over all visible pathes that start from the given
parent path.
|
void | invalidatePathBounds(TreePath path)
Discard the bound information for the given path.
|
void | invalidateSizes()
Mark all cached information as invalid. |
boolean | isExpanded(TreePath path)
Get the expanded state for the given tree path.
|
protected boolean | isFixedRowHeight()
Returns true if this layout supposes that all rows have the fixed
height.
|
void | setExpandedState(TreePath path, boolean isExpanded)
Set the expanded state of the given path. |
void | setModel(TreeModel newModel)
Set the tree model that will provide the data. |
void | setRootVisible(boolean visible)
Inform the instance if the tree root node is visible. |
void | treeNodesChanged(TreeModelEvent event)
The listener method, called when the tree nodes are changed.
|
void | treeNodesInserted(TreeModelEvent event)
The listener method, called when the tree nodes are inserted.
|
void | treeNodesRemoved(TreeModelEvent event)
The listener method, called when the tree nodes are removed.
|
void | treeStructureChanged(TreeModelEvent event)
Called when the tree structure has been changed.
|
Parameters: path the tree path rect the rectangle that will be reused to return the result.
Returns: Rectangle the bounds of the last line, defined by the given path.
Parameters: path the path being checked
Returns: true if the last node of the path is expanded, false otherwise.
Parameters: x the point x coordinate y the point y coordinate
Returns: the tree path, closest to the the given point
Parameters: row the row
Returns: TreePath the path
Returns: int the number of the displayed rows.
Parameters: path the path
Returns: int the row number or -1 if the end of the path is not visible.
Parameters: path the tree path
Returns: int the number of the visible childs (for row).
Parameters: parentPath the parent path
Returns: the enumeration over pathes
Parameters: path the path, for that the bound information must be recomputed.
Returns: true if the given path is expanded, false otherwise.
Returns: boolean true if all rows in the tree must have the fixed height (true by default).
Parameters: path the tree path, for that the state is being set. isExpanded the expanded state of the given path.
Parameters: visible true if the tree root node is visible, false otherwise.
Parameters: event the change event
Parameters: event the change event
Parameters: event the change event
Parameters: event the change event