| Method | Defined by | ||
|---|---|---|---|
|
TreePath(path:Array)
Constructs a path from an array of Objects, uniquely identifying
the path from the root of the tree to a specific node, as returned
by the tree's data model.
| TreePath | ||
|
[static]
Constructs a new TreePath, which is the path identified by
parent ending in lastElement. | TreePath | ||
|
equals(o:*):Boolean
Tests two TreePaths for equality by checking each element of the
paths for equality.
| TreePath | ||
|
Returns the last component of this path.
| TreePath | ||
|
Returns a path containing all the elements of this object, except
the last path component.
| TreePath | ||
|
getPath():Array
Returns an ordered array of Objects containing the components of this
TreePath.
| TreePath | ||
|
getPathComponent(element:int):*
Returns the path component at the specified index.
| TreePath | ||
|
getPathCount():int
Returns the number of elements in the path.
| TreePath | ||
|
isDescendant(aTreePath:TreePath):Boolean
Returns true if
aTreePath is a
descendant of this
TreePath. | TreePath | ||
|
pathByAddingChild(child:*):TreePath
Returns a new path containing all the elements of this object
plus
child. | TreePath | ||
|
toString():String
Returns a string that displays and identifies this
object's properties.
| TreePath | ||
| TreePath | () | constructor |
public function TreePath(path:Array)Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model.
The model is free to return an array of any Objects it needs to represent the path. The DefaultTreeModel returns an array of TreeNode objects. The first TreeNode in the path is the root of the tree, the last TreeNode is the node identified by the path.
Parameterspath:Array — an array of Objects representing the path to a node
|
| createTreePath | () | method |
public static function createTreePath(parent:TreePath, lastElement:*):TreePath
Constructs a new TreePath, which is the path identified by
parent ending in lastElement.
parent:TreePath |
|
lastElement:* |
TreePath |
| equals | () | method |
public function equals(o:*):Boolean
Tests two TreePaths for equality by checking each element of the
paths for equality. Two paths are considered equal if they are of
the same length, and contain
the same elements (.equals).
o:* — the Object to compare
|
Boolean |
| getLastPathComponent | () | method |
public function getLastPathComponent():*Returns the last component of this path. For a path returned by DefaultTreeModel this will return an instance of TreeNode.
Returns* — the Object at the end of the path
|
See also
| getParentPath | () | method |
public function getParentPath():TreePathReturns a path containing all the elements of this object, except the last path component.
ReturnsTreePath |
| getPath | () | method |
public function getPath():ArrayReturns an ordered array of Objects containing the components of this TreePath. The first element (index 0) is the root.
ReturnsArray — an array of Objects representing the TreePath
|
See also
| getPathComponent | () | method |
public function getPathComponent(element:int):*Returns the path component at the specified index.
Parameterselement:int — an int specifying an element in the path, where
0 is the first element in the path
|
* — the Object at that index location, undefined if the index is beyond the length of the path
|
See also
| getPathCount | () | method |
public function getPathCount():intReturns the number of elements in the path.
Returnsint — an int giving a count of items the path
|
| isDescendant | () | method |
public function isDescendant(aTreePath:TreePath):Boolean
Returns true if aTreePath is a
descendant of this
TreePath. A TreePath P1 is a descendent of a TreePath P2
if P1 contains all of the components that make up
P2's path.
For example, if this object has the path [a, b],
and aTreePath has the path [a, b, c],
then aTreePath is a descendant of this object.
However, if aTreePath has the path [a],
then it is not a descendant of this object.
aTreePath:TreePath |
Boolean — true if aTreePath is a descendant of this path
|
| pathByAddingChild | () | method |
public function pathByAddingChild(child:*):TreePath
Returns a new path containing all the elements of this object
plus child. child will be the last element
of the newly created TreePath.
This will throw a NullPointerException
if child is null.
child:* |
TreePath |
| toString | () | method |
public function toString():StringReturns a string that displays and identifies this object's properties.
ReturnsString — a String representation of this object
|