Packageorg.aswing.tree
Classpublic class FixedHeightLayoutCache
InheritanceFixedHeightLayoutCache Inheritance AbstractLayoutCache



Protected Properties
 PropertyDefined by
 InheritednodeDimensions : NodeDimensions
Object responsible for getting the size of a node.
AbstractLayoutCache
 InheritedrootVisible : Boolean
True if the root node is displayed, false if its children are the highest visible nodes.
AbstractLayoutCache
 InheritedtreeModel : TreeModel
Model providing information.
AbstractLayoutCache
 InheritedtreeSelectionModel : TreeSelectionModel
Selection model.
AbstractLayoutCache
Public Methods
 MethodDefined by
  
FixedHeightLayoutCache
  
Adds a mapping for node.
FixedHeightLayoutCache
  
adjustRowCountBy(changeAmount:int):void
Adjust the large row count of the AbstractTreeUI the receiver was created with.
FixedHeightLayoutCache
  
createNodeForValue(value:Object, childIndex:int):FHTreeStateNode
Creates and returns an instance of FHTreeStateNode.
FixedHeightLayoutCache
  
Returns a rectangle giving the bounds needed to draw path.
FixedHeightLayoutCache
  
getExpandedState(path:TreePath):Boolean
Returns true if the path is expanded, and visible.
FixedHeightLayoutCache
 Inherited
Returns the TreeModel that is providing the data.
AbstractLayoutCache
 Inherited
Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
AbstractLayoutCache
  
getPathClosestTo(x:int, y:int):TreePath
Returns the path to the node that is closest to x,y.
FixedHeightLayoutCache
  
Returns the path for passed in row.
FixedHeightLayoutCache
 Inherited
Returns the preferred height.
AbstractLayoutCache
 Inherited
Returns the preferred width for the passed in region.
AbstractLayoutCache
  
getRowContainingYLocation(location:int):int
Returns the index of the row containing location.
FixedHeightLayoutCache
  
Returns the number of visible rows.
FixedHeightLayoutCache
  
Returns the row that the last item identified in path is visible at.
FixedHeightLayoutCache
 Inherited
Returns the height of each row.
AbstractLayoutCache
 Inherited
getRowsForPaths(paths:Array):Array
Returns the rows that the TreePath instances in path are being displayed at.
AbstractLayoutCache
 Inherited
Returns the model used to maintain the selection.
AbstractLayoutCache
  
Returns the number of visible children for row.
FixedHeightLayoutCache
  
getVisiblePathsFrom(path:TreePath, totalCount:int):Array
Returns an array that increments over the visible paths starting at the passed in location and end by totalCount of the tree end.
FixedHeightLayoutCache
  
Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
FixedHeightLayoutCache
  
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
FixedHeightLayoutCache
  
isExpanded(path:TreePath):Boolean
Returns true if the value identified by row is currently expanded.
FixedHeightLayoutCache
 Inherited
isRootVisible():Boolean
Returns true if the root node of the tree is displayed.
AbstractLayoutCache
  
Removes the mapping for a previously added node.
FixedHeightLayoutCache
  
setExpandedState(path:TreePath, isExpanded:Boolean):void
Marks the path path expanded state to isExpanded.
FixedHeightLayoutCache
  
setModel(newModel:TreeModel):void
Sets the TreeModel that will provide the data.
FixedHeightLayoutCache
 Inherited
Sets the renderer that is responsible for drawing nodes in the tree and which is threfore responsible for calculating the dimensions of individual nodes.
AbstractLayoutCache
  
setRootVisible(rootVisible:Boolean):void
Determines whether or not the root node from the TreeModel is visible.
FixedHeightLayoutCache
  
setRowCount(rc:int):void
FixedHeightLayoutCache
  
setRowHeight(rowHeight:int):void
Sets the height of each cell.
FixedHeightLayoutCache
 Inherited
Sets the TreeSelectionModel used to manage the selection to new LSM.
AbstractLayoutCache
  

Invoked after a node (or a set of siblings) has changed in some way.

FixedHeightLayoutCache
  

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.

FixedHeightLayoutCache
  

Invoked after nodes have been removed from the tree.

FixedHeightLayoutCache
  

Invoked after the tree has drastically changed structure from a given node down.

FixedHeightLayoutCache
Protected Methods
 MethodDefined by
 Inherited
countNodeDimensions(value:Object, row:int, depth:int, expanded:Boolean, placeIn:IntRectangle):IntRectangle
Returns, by reference in placeIn, the size needed to represent value.
AbstractLayoutCache
Constructor detail
FixedHeightLayoutCache()constructor
public function FixedHeightLayoutCache()
Method detail
addMapping()method
public function addMapping(node:FHTreeStateNode):void

Adds a mapping for node.

Parameters
node:FHTreeStateNode
adjustRowCountBy()method 
public function adjustRowCountBy(changeAmount:int):void

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

Parameters
changeAmount:int
createNodeForValue()method 
public function createNodeForValue(value:Object, childIndex:int):FHTreeStateNode

Creates and returns an instance of FHTreeStateNode.

Parameters
value:Object
 
childIndex:int

Returns
FHTreeStateNode
getBounds()method 
public override function getBounds(path:TreePath, placeIn:IntRectangle):IntRectangle

Returns a rectangle giving the bounds needed to draw path.

Parameters
path:TreePath — a TreePath specifying a node
 
placeIn:IntRectangle — a IntRectangle object giving the available space, to avoid create new instance.

Returns
IntRectangle — a IntRectangle object specifying the space to be used
getExpandedState()method 
public override function getExpandedState(path:TreePath):Boolean

Returns true if the path is expanded, and visible.

Parameters
path:TreePath

Returns
Boolean
getPathClosestTo()method 
public override 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.

Parameters
x:int
 
y:int

Returns
TreePath
getPathForRow()method 
public override function getPathForRow(row:int):TreePath

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

Parameters
row:int

Returns
TreePath
getRowContainingYLocation()method 
public override 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.

Parameters
location:int

Returns
int
getRowCount()method 
public override function getRowCount():int

Returns the number of visible rows.

Returns
int
getRowForPath()method 
public override 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.

Parameters
path:TreePath

Returns
int
getVisibleChildCount()method 
public override function getVisibleChildCount(path:TreePath):int

Returns the number of visible children for row.

Parameters
path:TreePath

Returns
int
getVisiblePathsFrom()method 
public override function getVisiblePathsFrom(path:TreePath, totalCount:int):Array

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.

Parameters
path:TreePath — the total number of path to contains.
 
totalCount:int

Returns
Array
invalidatePathBounds()method 
public override function invalidatePathBounds(path:TreePath):void

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

Parameters
path:TreePath
invalidateSizes()method 
public override function invalidateSizes():void

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

isExpanded()method 
public override function isExpanded(path:TreePath):Boolean

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

Parameters
path:TreePath

Returns
Boolean
removeMapping()method 
public function removeMapping(node:FHTreeStateNode):void

Removes the mapping for a previously added node.

Parameters
node:FHTreeStateNode
setExpandedState()method 
public override function setExpandedState(path:TreePath, isExpanded:Boolean):void

Marks the path path expanded state to isExpanded.

Parameters
path:TreePath
 
isExpanded:Boolean
setModel()method 
public override function setModel(newModel:TreeModel):void

Sets the TreeModel that will provide the data.

Parameters
newModel:TreeModel — the TreeModel that is to provide the data
setRootVisible()method 
public override function setRootVisible(rootVisible:Boolean):void

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

Parameters
rootVisible:Boolean — true if the root node of the tree is to be displayed

See also

setRowCount()method 
public function setRowCount(rc:int):voidParameters
rc:int
setRowHeight()method 
public override 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.

Parameters
rowHeight:int — the height of each cell, in pixels
treeNodesChanged()method 
public override 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).

Parameters
e:TreeModelEvent
treeNodesInserted()method 
public override 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. Parameters

e:TreeModelEvent
treeNodesRemoved()method 
public override 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.

Parameters
e:TreeModelEvent
treeStructureChanged()method 
public override 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.

Parameters
e:TreeModelEvent