class org.aswing.tree.FixedHeightLayoutCache extends AbstractLayoutCache

@author paling

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from AbstractLayoutCache

function getBounds(path:TreePath, placeIn:IntRectangle):IntRectangle
function getExpandedState(path:TreePath):Bool
function getModel():TreeModel
function getNodeDimensions():NodeDimensions
function getPathClosestTo(x:Int, y:Int):TreePath
function getPathForRow(row:Int):TreePath
function getPreferredHeight():Int
function getPreferredWidth(bounds:IntRectangle):Int
function getRowContainingYLocation(location:Int):Int
function getRowCount():Int
function getRowForPath(path:TreePath):Int
function getRowHeight():Int
function getRowsForPaths(paths:Array<Dynamic>):Array<Dynamic>
function getSelectionModel():TreeSelectionModel
function getVisibleChildCount(path:TreePath):Int
function getVisiblePathsFrom(path:TreePath, totalCount:Int):Array<Dynamic>
function invalidatePathBounds(path:TreePath):Void
function invalidateSizes():Void
function isExpanded(path:TreePath):Bool
function isRootVisible():Bool
function setExpandedState(path:TreePath, isExpanded:Bool):Void
function setModel(newModel:TreeModel):Void
function setNodeDimensions(nd:NodeDimensions):Void
function setRootVisible(rootVisible:Bool):Void
function setRowHeight(rowHeight:Int):Void
function setSelectionModel(newLSM:TreeSelectionModel):Void
function treeNodesChanged(e:TreeModelEvent):Void
function treeNodesInserted(e:TreeModelEvent):Void
function treeNodesRemoved(e:TreeModelEvent):Void
function treeStructureChanged(e:TreeModelEvent):Void

function new(): Void

function addMapping(node:FHTreeStateNode): Void

Adds a mapping for node.

function adjustRowCountBy(changeAmount:Int): Void

Adjust the large row count of the AbstractTreeUI the receiver was created with.

function createNodeForValue(value:Dynamic, childIndex:Int): FHTreeStateNode

Creates and returns an instance of FHTreeStateNode.

function getBounds(path:TreePath, placeIn:IntRectangle): IntRectangle

Returns a rectangle giving the bounds needed to draw path.

path

a TreePath specifying a node

placeIn

a IntRectangle object giving the available space, to avoid create new instance.

returns

a IntRectangle object specifying the space to be used

function getExpandedState(path:TreePath): Bool

Returns true if the path is expanded, and visible.

function getPathClosestTo(x:Int, y:Int): TreePath

Returns the path to the node that is closest to x,y. If * there is nothing currently visible this will return null, otherwise * it'll always return a valid path. If you need to test if the * returned object is exactly at x, y you should get the bounds for * the returned path and test x, y against that.

function getPathForRow(row:Int): TreePath

Returns the path for passed in row. If row is not visible * null is returned.

function getRowContainingYLocation(location:Int): Int

Returns the index of the row containing location. If there * are no rows, -1 is returned. If location is beyond the last * row index, the last row index is returned.

function getRowCount(): Int

Returns the number of visible rows.

function getRowForPath(path:TreePath): Int

Returns the row that the last item identified in path is visible * at. Will return -1 if any of the elements in path are not * currently visible.

function getVisibleChildCount(path:TreePath): Int

Returns the number of visible children for row.

function getVisiblePathsFrom(path:TreePath, totalCount:Int): Array<Dynamic>

Returns an array that increments over the visible paths starting at the passed in location and end by totalCount of the tree end. The ordering of the enumeration is based on how the paths are displayed.

totalCount

the total number of path to contains.

function invalidatePathBounds(path:TreePath): Void

Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.

function invalidateSizes(): Void

Informs the TreeState that it needs to recalculate all the sizes it is referencing.

function isExpanded(path:TreePath): Bool

Returns true if the value identified by row is currently expanded.

function removeMapping(node:FHTreeStateNode): Void

Removes the mapping for a previously added node.

function setExpandedState(path:TreePath, isExpanded:Bool): Void

Marks the path path expanded state to isExpanded.

function setModel(newModel:TreeModel): Void

Sets the TreeModel that will provide the data.

newModel

the TreeModel that is to provide the data

function setRootVisible(rootVisible:Bool): Void

Determines whether or not the root node from the TreeModel is visible.

@see #rootVisible

rootVisible

true if the root node of the tree is to be displayed

function setRowCount(rc:Int): Void

function setRowHeight(rowHeight:Int): Void

Sets the height of each cell. If rowHeight is less than or equal to 0 this will throw an IllegalArgumentException.

rowHeight

the height of each cell, in pixels

function treeNodesChanged(e:TreeModelEvent): Void

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

e.path() returns the path the parent of the changed node(s).

e.childIndices() returns the index(es) of the changed node(s).

function treeNodesInserted(e:TreeModelEvent): Void

Invoked after nodes have been inserted into the tree.

e.path() returns the parent of the new nodes

e.childIndices() returns the indices of the new nodes in ascending order.

function treeNodesRemoved(e:TreeModelEvent): Void

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

e.path() returns the former parent of the deleted nodes.

e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

function treeStructureChanged(e:TreeModelEvent): Void

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

e.path() holds the path to the node.

e.childIndices() returns null.