|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Boxed
org.gnu.gtk.TreePath
A path refers to a single row in a TreeModel
(such as a
ListStore
or a TreeStore
). In this respect, it is similar
to a TreeIter
, however a path also contains details of the
structure of the tree (TreeIter is a generic object for the entire TreeView
family, including flat lists and tables.)
Field Summary |
Fields inherited from class org.gnu.glib.Boxed |
handle |
Constructor Summary | |
|
TreePath()
Constructs a new path. |
protected |
TreePath(Handle handle)
Construct path from native handle |
|
TreePath(java.lang.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. |
protected static void |
gtk_tree_path_append_index(Handle path,
int index)
|
protected static int |
gtk_tree_path_compare(Handle a,
Handle b)
|
protected static void |
gtk_tree_path_down(Handle path)
|
protected static int |
gtk_tree_path_get_depth(Handle path)
|
protected static int[] |
gtk_tree_path_get_indices(Handle path)
|
protected static boolean |
gtk_tree_path_is_ancestor(Handle path,
Handle descendant)
|
protected static boolean |
gtk_tree_path_is_descendant(Handle path,
Handle ancestor)
|
protected static Handle |
gtk_tree_path_new_first()
|
protected static Handle |
gtk_tree_path_new_from_string(java.lang.String path)
|
protected static Handle |
gtk_tree_path_new()
|
protected static void |
gtk_tree_path_next(Handle path)
|
protected static void |
gtk_tree_path_prepend_index(Handle path,
int index)
|
protected static boolean |
gtk_tree_path_prev(Handle path)
|
protected static java.lang.String |
gtk_tree_path_to_string(Handle path)
|
protected static boolean |
gtk_tree_path_up(Handle 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. |
java.lang.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. |
Methods inherited from class org.gnu.glib.Boxed |
equals, getHandle, hashCode, setHandle |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected TreePath(Handle handle)
public TreePath()
public TreePath(java.lang.String path)
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.
Method Detail |
public java.lang.String toString()
public int getDepth()
public int compare(TreePath other)
public void next()
public boolean previous()
public boolean up()
public void down()
public boolean isAncestor(TreePath descendant)
descendant
- Another TreePath
public boolean isDescendant(TreePath ancestor)
ancestor
- Another TreePath
public void appendIndex(int index)
index
- public void prependIndex(int index)
index
- public int[] getIndices()
protected static final Handle gtk_tree_path_new()
protected static final Handle gtk_tree_path_new_from_string(java.lang.String path)
protected static final java.lang.String gtk_tree_path_to_string(Handle path)
protected static final Handle gtk_tree_path_new_first()
protected static final void gtk_tree_path_append_index(Handle path, int index)
protected static final void gtk_tree_path_prepend_index(Handle path, int index)
protected static final int gtk_tree_path_get_depth(Handle path)
protected static final int[] gtk_tree_path_get_indices(Handle path)
protected static final int gtk_tree_path_compare(Handle a, Handle b)
protected static final void gtk_tree_path_next(Handle path)
protected static final boolean gtk_tree_path_prev(Handle path)
protected static final boolean gtk_tree_path_up(Handle path)
protected static final void gtk_tree_path_down(Handle path)
protected static final boolean gtk_tree_path_is_ancestor(Handle path, Handle descendant)
protected static final boolean gtk_tree_path_is_descendant(Handle path, Handle ancestor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |