org.gnu.gtk
public class TreePath extends Boxed
Constructor Summary | |
---|---|
TreePath()
Constructs a new path. | |
TreePath(String path)
Creates a new TreePath initialized to path .
|
Method Summary | |
---|---|
void | appendIndex(int index)
Appends a new index to the path. |
int | compare(TreePath other)
Compares the path with another path. |
void | down()
Moves path to point to the first child of the current path. |
int | getDepth()
Returns the current depth of path. |
int[] | getIndices()
Returns the current indices of the path.
|
boolean | isAncestor(TreePath descendant)
Returns TRUE if descendant is a descendant of path.
|
boolean | isDescendant(TreePath ancestor)
Returns TRUE if path is a descendant of ancestor.
|
void | next()
Moves the path to point to the next node at the current depth. |
void | prependIndex(int index)
Prepends a new index to the path. |
boolean | previous()
Moves the path to point to the previous node at the current depth, if it
exists.
|
String | toString()
Generates a string representation of the path. |
boolean | up()
Moves the path to point to it's parent node, if it has a parent.
|
path
.
path
is expected to be a colon separated list of numbers.
For example, the string "10:4:0" would create a path of depth 3 pointing
to the 11th child of the root node, the 5th child of that 11th child, and
the 1st child of that 5th child. If an invalid path string is passed in,
NULL is returned. TODO: throw an exception on null response.Parameters: index
Returns: An array of ints, each representing a node in the tree.
Parameters: descendant Another TreePath
Returns: TRUE if descendant is contained inside path
Parameters: ancestor Another TreePath
Returns: TRUE if ancestor contains path somewhere below it
Parameters: index
Returns: TRUE if path has a previous node, and the move was made.
Returns: String representation of the path.
Returns: TRUE if path has a parent, and the move was made.