|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.gnome.glib.Boxed
org.gnome.gtk.TreePath
public final class TreePath
A logical but abstract representation of a row in a TreeModel. TreePaths can be expressed as Strings.
Paths in ListStores are quite simple. They are a simple number,
incrementing from zero, indicating the row number. For example,
TreePath("8")
is the ninth row in the model.
Paths for TreeStores are more complex. They are of the form
"first:second:third:..." where each of first, second, and third denote the
number of steps in from the first at each level of the hierarchy. For
example, TreePath("2:4:0")
represents the first third level
element in the fifth second level element in the third row.
TreePaths are given to you as a row address in signals like
TreeView.RowActivated
. Usually you need the row expressed as a
TreeIter (ie to get a value out of the row);to do that call the underlying
TreeModel's getIter()
method.
Constructor Summary | |
---|---|
TreePath(String path)
Create a TreePath object from the String form. |
Method Summary | |
---|---|
boolean |
equals(Object other)
Return true of this TreePath represents the same logical
path as the other does. |
int |
getDepth()
Returns the depth of node identified by this TreePath within the tree. |
int[] |
getIndices()
Returns the indices the path consists of as an array of integer. |
String |
toString()
Return the text form represented by this TreePath. |
Methods inherited from class Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreePath(String path)
getIter()
method.
IllegalArgumentException
- if the path
fails to parse as a valid
TreePath.Method Detail |
---|
public boolean equals(Object other)
true
of this TreePath represents the same logical
path as the other
does.
equals
in class Object
public int getDepth()
public int[] getIndices()
null
if nothing is
selected.public String toString()
toString
in class org.freedesktop.bindings.Pointer
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |