| Package | org.aswing.tree |
| Class | public class FHTreeStateNode |
| Inheritance | FHTreeStateNode DefaultMutableTreeNode |
| Method | Defined by | ||
|---|---|---|---|
|
FHTreeStateNode(layoutCache:FixedHeightLayoutCache, userObject:Object, childIndex:int, row:int)
| FHTreeStateNode | ||
|
adjustRowBy(amount:int, startIndex:int = -2):void
adjustRowBy(amount:int, startIndex:int)
Adjusts this node, its child, and its parent starting at an index of index index is the index of the child
to start adjusting from, which is not necessarily the model
index. | FHTreeStateNode | ||
![]() |
append(newChild:MutableTreeNode):void
Removes
newChild from its parent and makes it a child of
this node by adding it to the end of this node's child array. | DefaultMutableTreeNode | |
![]() |
breadthFirstEnumeration():Array
Creates and returns an enumeration that traverses the subtree rooted at
this node in breadth-first order.
| DefaultMutableTreeNode | |
|
childInsertedAtModelIndex(index:int, isExpandedAndVisible:Boolean):void
Messaged when a child has been inserted at index.
| FHTreeStateNode | ||
![]() |
children():Array
Creates and returns a forward-order enumeration of this node's
children.
| DefaultMutableTreeNode | |
|
collapse(adjustRows:Boolean):void
Collapses the receiver.
| FHTreeStateNode | ||
|
createChildFor(userObject:Object):FHTreeStateNode
Creates a new node to represent
userObject. | FHTreeStateNode | ||
![]() |
depthFirstEnumeration():Array
Creates and returns an enumeration that traverses the subtree rooted at
this node in depth-first order.
| DefaultMutableTreeNode | |
|
expand():void
Expands the receiver.
| FHTreeStateNode | ||
![]() |
getAllowsChildren():Boolean
Returns true if this node is allowed to have children.
| DefaultMutableTreeNode | |
![]() |
Returns the child in this node's child array that immediately
follows
aChild, which must be a child of this node. | DefaultMutableTreeNode | |
![]() |
getChildAt(index:int):TreeNode
Returns the child at the specified index in this node's child array.
| DefaultMutableTreeNode | |
|
getChildAtModelIndex(index:int):FHTreeStateNode
Returns the child for the passed in model index, this will
return
null if the child for index
has not yet been created (expanded). | FHTreeStateNode | ||
![]() |
Returns the child in this node's child array that immediately
precedes
aChild, which must be a child of this node. | DefaultMutableTreeNode | |
![]() |
getChildCount():int
Returns the number of children of this node.
| DefaultMutableTreeNode | |
|
getChildIndex():int
Returns the index of the receiver in the model.
| FHTreeStateNode | ||
![]() |
getDepth():int
Returns the depth of the tree rooted at this node -- the longest
distance from this node to a leaf.
| DefaultMutableTreeNode | |
![]() |
Returns this node's first child.
| DefaultMutableTreeNode | |
![]() |
Finds and returns the first leaf that is a descendant of this node --
either this node or its first child's first leaf.
| DefaultMutableTreeNode | |
![]() |
Returns the index of the specified child in this node's child array.
| DefaultMutableTreeNode | |
![]() |
Returns this node's last child.
| DefaultMutableTreeNode | |
![]() |
Finds and returns the last leaf that is a descendant of this node --
either this node or its last child's last leaf.
| DefaultMutableTreeNode | |
![]() |
getLeafCount():int
Returns the total number of leaves that are descendants of this node.
| DefaultMutableTreeNode | |
![]() |
getLevel():int
Returns the number of levels above this node -- the distance from
the root to this node.
| DefaultMutableTreeNode | |
![]() |
Returns the leaf after this node or null if this node is the
last leaf in the tree.
| DefaultMutableTreeNode | |
![]() |
Returns the node that follows this node in a preorder traversal of this
node's tree.
| DefaultMutableTreeNode | |
![]() |
Returns the next sibling of this node in the parent's children array.
| DefaultMutableTreeNode | |
![]() |
Returns this node's parent or null if this node has no parent.
| DefaultMutableTreeNode | |
![]() |
getPath():Array
Returns the path from the root, to get to this node.
| DefaultMutableTreeNode | |
|
getPathForRow(row:int, nextRow:int, info:SearchInfo):Boolean
Returns true if there is a row for
row. | FHTreeStateNode | ||
![]() |
Returns the leaf before this node or null if this node is the
first leaf in the tree.
| DefaultMutableTreeNode | |
![]() |
Returns the node that precedes this node in a preorder traversal of
this node's tree.
| DefaultMutableTreeNode | |
![]() |
Returns the previous sibling of this node in the parent's children
array.
| DefaultMutableTreeNode | |
![]() |
Returns the root of the tree that contains this node.
| DefaultMutableTreeNode | |
|
getRow():int
Returns the row of the receiver.
| FHTreeStateNode | ||
|
getRowToModelIndex(index:int):int
Returns the row of the child with a model index of
index. | FHTreeStateNode | ||
![]() |
Returns the nearest common ancestor to this node and
aNode. | DefaultMutableTreeNode | |
![]() |
getSiblingCount():int
Returns the number of siblings of this node.
| DefaultMutableTreeNode | |
|
getTotalChildCount():int
Returns the number of children in the receiver by descending all
expanded nodes and messaging them with getTotalChildCount.
| FHTreeStateNode | ||
|
Returns the
TreePath of the receiver. | FHTreeStateNode | ||
![]() |
getUserObject():*
Returns this node's user object.
| DefaultMutableTreeNode | |
![]() |
getUserObjectPath():Array
Returns the user object path, from the root, to get to this node.
| DefaultMutableTreeNode | |
|
getVisibleLevel():int
The highest visible nodes have a depth of 0.
| FHTreeStateNode | ||
![]() |
insert(newChild:MutableTreeNode, childIndex:int):void
Removes
newChild from its present parent (if it has a
parent), sets the child's parent to this node, and then adds the child
to this node's child array at index childIndex. | DefaultMutableTreeNode | |
|
isExpanded():Boolean
Returns true if this node is expanded.
| FHTreeStateNode | ||
|
isLeaf():Boolean
Returns true if the receiver is a leaf.
| FHTreeStateNode | ||
![]() |
isNodeAncestor(anotherNode:TreeNode):Boolean
Returns true if
anotherNode is an ancestor of this node
-- if it is this node, this node's parent, or an ancestor of this
node's parent. | DefaultMutableTreeNode | |
![]() |
isNodeChild(aNode:TreeNode):Boolean
Returns true if
aNode is a child of this node. | DefaultMutableTreeNode | |
![]() |
isNodeDescendant(anotherNode:DefaultMutableTreeNode):Boolean
Returns true if
anotherNode is a descendant of this node
-- if it is this node, one of this node's children, or a descendant of
one of this node's children. | DefaultMutableTreeNode | |
![]() |
isNodeRelated(aNode:DefaultMutableTreeNode):Boolean
Returns true if and only if
aNode is in the same tree
as this node. | DefaultMutableTreeNode | |
![]() |
isNodeSibling(anotherNode:TreeNode):Boolean
Returns true if
anotherNode is a sibling of (has the
same parent as) this node. | DefaultMutableTreeNode | |
![]() |
isRoot():Boolean
Returns true if this node is the root of the tree.
| DefaultMutableTreeNode | |
|
isVisible():Boolean
Returns true if this node is visible.
| FHTreeStateNode | ||
|
makeVisible():void
Makes the receiver visible, but invoking
expandParentAndReceiver on the superclass. | FHTreeStateNode | ||
![]() |
pathFromAncestorEnumeration(ancestor:TreeNode):Array
Creates and returns an enumeration that follows the path from
ancestor to this node. | DefaultMutableTreeNode | |
![]() |
postorderEnumeration():Array
Creates and returns an enumeration that traverses the subtree rooted at
this node in postorder.
| DefaultMutableTreeNode | |
![]() |
preorderEnumeration():Array
Creates and returns an enumeration that traverses the subtree rooted at
this node in preorder.
| DefaultMutableTreeNode | |
![]() |
remove(aChild:MutableTreeNode):void
Removes
aChild from this node's child array, giving it a
null parent. | DefaultMutableTreeNode | |
![]() |
removeAllChildren():void
Removes all of this node's children, setting their parents to null.
| DefaultMutableTreeNode | |
|
removeAt(childIndex:int):void
Messaged when this node is removed from its parent, this messages
removedFromMapping to remove all the children. | FHTreeStateNode | ||
|
removeChildAtModelIndex(modelIndex:int, isChildVisible:Boolean):void
Adds newChild to this nodes children at the appropriate location.
| FHTreeStateNode | ||
![]() |
removeFromParent():void
Removes the subtree rooted at this node from the tree, giving this
node a null parent.
| DefaultMutableTreeNode | |
|
resetChildrenRowsFrom(newRow:int, childIndex:int, modelIndex:int):void
Resets the receivers childrens rows.
| FHTreeStateNode | ||
![]() |
setAllowsChildren(allows:Boolean):void
Determines whether or not this node is allowed to have children.
| DefaultMutableTreeNode | |
|
setParent(parent:MutableTreeNode):void
Messaged when this node is added somewhere, resets the path
and adds a mapping from path to this node.
| FHTreeStateNode | ||
| FHTreeStateNode | |||
|
setRow(r:int):void
| FHTreeStateNode | ||
|
setUserObject(o:*):void
Messaged to set the user object.
| FHTreeStateNode | ||
![]() |
toString():String
Returns the result of sending
toString() to this node's
user object, or null if this node has no user object. | DefaultMutableTreeNode | |
| FHTreeStateNode | () | constructor |
public function FHTreeStateNode(layoutCache:FixedHeightLayoutCache, userObject:Object, childIndex:int, row:int)Parameters
layoutCache:FixedHeightLayoutCache |
|
userObject:Object |
|
childIndex:int |
|
row:int |
| adjustRowBy | () | method |
public function adjustRowBy(amount:int, startIndex:int = -2):void
adjustRowBy(amount:int, startIndex:int)
Adjusts this node, its child, and its parent starting at
an index of index index is the index of the child
to start adjusting from, which is not necessarily the model
index.
adjustRowBy(amount:int)
or adjustRowBy(amount:int, -2)
Adjusts the receiver, and all its children rows by
amount.
Parameters
amount:int |
|
startIndex:int (default = -2) |
| childInsertedAtModelIndex | () | method |
public function childInsertedAtModelIndex(index:int, isExpandedAndVisible:Boolean):voidMessaged when a child has been inserted at index. For all the children that have a childIndex >= index their index is incremented by one.
Parametersindex:int |
|
isExpandedAndVisible:Boolean |
| collapse | () | method |
public function collapse(adjustRows:Boolean):void
Collapses the receiver. If adjustRows is true,
the rows of nodes after the receiver are adjusted.
adjustRows:Boolean |
| createChildFor | () | method |
public function createChildFor(userObject:Object):FHTreeStateNode
Creates a new node to represent userObject.
This does NOT check to ensure there isn't already a child node
to manage userObject.
userObject:Object |
FHTreeStateNode |
| expand | () | method |
public function expand():voidExpands the receiver.
| getChildAtModelIndex | () | method |
public function getChildAtModelIndex(index:int):FHTreeStateNode
Returns the child for the passed in model index, this will
return null if the child for index
has not yet been created (expanded).
index:int |
FHTreeStateNode |
| getChildIndex | () | method |
public function getChildIndex():intReturns the index of the receiver in the model.
Returnsint |
| getPathForRow | () | method |
public function getPathForRow(row:int, nextRow:int, info:SearchInfo):Boolean
Returns true if there is a row for row.
nextRow gives the bounds of the receiver.
Information about the found row is returned in info.
This should be invoked on root with nextRow set
to getRowCount().
row:int |
|
nextRow:int |
|
info:SearchInfo |
Boolean |
| getRow | () | method |
public function getRow():intReturns the row of the receiver.
Returnsint |
| getRowToModelIndex | () | method |
public function getRowToModelIndex(index:int):int
Returns the row of the child with a model index of
index.
index:int |
int |
| getTotalChildCount | () | method |
public function getTotalChildCount():intReturns the number of children in the receiver by descending all expanded nodes and messaging them with getTotalChildCount.
Returnsint |
| getTreePath | () | method |
| getVisibleLevel | () | method |
public function getVisibleLevel():intThe highest visible nodes have a depth of 0.
Returnsint |
| isExpanded | () | method |
public function isExpanded():BooleanReturns true if this node is expanded.
ReturnsBoolean |
| isLeaf | () | method |
public override function isLeaf():BooleanReturns true if the receiver is a leaf.
ReturnsBoolean |
| isVisible | () | method |
public function isVisible():BooleanReturns true if this node is visible. This is determined by asking all the parents if they are expanded.
ReturnsBoolean |
| makeVisible | () | method |
public function makeVisible():void
Makes the receiver visible, but invoking
expandParentAndReceiver on the superclass.
| removeAt | () | method |
public override function removeAt(childIndex:int):void
Messaged when this node is removed from its parent, this messages
removedFromMapping to remove all the children.
childIndex:int |
| removeChildAtModelIndex | () | method |
public function removeChildAtModelIndex(modelIndex:int, isChildVisible:Boolean):voidAdds newChild to this nodes children at the appropriate location. The location is determined from the childIndex of newChild.
ParametersmodelIndex:int |
|
isChildVisible:Boolean |
| resetChildrenRowsFrom | () | method |
public function resetChildrenRowsFrom(newRow:int, childIndex:int, modelIndex:int):void
Resets the receivers childrens rows. Starting with the child
at childIndex (and modelIndex) to
newRow. This uses setRowAndChildren
to recursively descend children, and uses
resetRowSelection to ascend parents.
newRow:int |
|
childIndex:int |
|
modelIndex:int |
| setParent | () | method |
public override function setParent(parent:MutableTreeNode):voidMessaged when this node is added somewhere, resets the path and adds a mapping from path to this node.
Parametersparent:MutableTreeNode |
| setPath | () | method |
| setRow | () | method |
public function setRow(r:int):voidParameters
r:int |
| setUserObject | () | method |
public override function setUserObject(o:*):voidMessaged to set the user object. This resets the path.
Parameterso:* |