org.gnu.gtk

Class TreeIter


public class TreeIter
extends Boxed

A tree iterator refers to a particular row of a TreeView object. They are used internally by many methods, but don't have any useful methods themselves.

Field Summary

Fields inherited from class org.gnu.glib.Boxed

handle

Constructor Summary

TreeIter(Handle handle, TreeModel model)
construct iter from handle to native resources.

Method Summary

TreeIter
getChild(int index)
Returns an iterator for the child of the given parent at a position identified by index.
int
getChildCount()
Returns the number of children that iter has
TreeIter
getFirstChild()
Returns an iterator for the first child of the given iterator, or null if the iter has no children.
boolean
getHasChild()
Returns TRUE if iter has children, FALSE otherwise.
TreeModel
getModel()
Returns the TreeModel which this Iter is associated with
TreeIter
getNextIter()
Returns the next iter pointing to the node following the TreeIter provided at the same level.
TreeIter
getParent()
Return the parent iterator of the given child.
TreePath
getPath()
Returns a newly-created TreePath referenced by this iter.
static Type
getType()
Retrieve the runtime type used by the GLib library.
protected static Handle
gtk_tree_iter_copy(Handle iter)
protected static void
gtk_tree_iter_free(Handle iter)
protected static int
gtk_tree_iter_get_type()
protected static Handle
gtk_tree_model_get_path(Handle treeModel, Handle iter)
protected static String
gtk_tree_model_get_string_from_iter(Handle treeModel, Handle iter)
protected static Handle
gtk_tree_model_iter_children(Handle treeModel, Handle parent)
protected static boolean
gtk_tree_model_iter_has_child(Handle treeModel, Handle iter)
protected static int
gtk_tree_model_iter_n_children(Handle treeModel, Handle iter)
protected static Handle
gtk_tree_model_iter_next(Handle treeModel, Handle iter)
protected static Handle
gtk_tree_model_iter_nth_child(Handle treeModel, Handle parent, int n)
protected static Handle
gtk_tree_model_iter_parent(Handle treeModel, Handle child)
String
toString()
Generates a string representation of the iter.

Methods inherited from class org.gnu.glib.Boxed

equals, getHandle, hashCode, setHandle

Constructor Details

TreeIter

public TreeIter(Handle handle,
                TreeModel model)
construct iter from handle to native resources.

Method Details

getChild

public TreeIter getChild(int index)
Returns an iterator for the child of the given parent at a position identified by index.


getChildCount

public int getChildCount()
Returns the number of children that iter has


getFirstChild

public TreeIter getFirstChild()
Returns an iterator for the first child of the given iterator, or null if the iter has no children.


getHasChild

public boolean getHasChild()
Returns TRUE if iter has children, FALSE otherwise.


getModel

public TreeModel getModel()
Returns the TreeModel which this Iter is associated with


getNextIter

public TreeIter getNextIter()
Returns the next iter pointing to the node following the TreeIter provided at the same level. If there is no next iter it will return null.

Use this in combination with TreeModel.getFirstIter() to loop through all values in the model.


getParent

public TreeIter getParent()
Return the parent iterator of the given child.


getPath

public TreePath getPath()
Returns a newly-created TreePath referenced by this iter.


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


gtk_tree_iter_copy

protected static final Handle gtk_tree_iter_copy(Handle iter)


gtk_tree_iter_free

protected static final void gtk_tree_iter_free(Handle iter)


gtk_tree_iter_get_type

protected static final int gtk_tree_iter_get_type()


gtk_tree_model_get_path

protected static final Handle gtk_tree_model_get_path(Handle treeModel,
                                                      Handle iter)


gtk_tree_model_get_string_from_iter

protected static final String gtk_tree_model_get_string_from_iter(Handle treeModel,
                                                                  Handle iter)


gtk_tree_model_iter_children

protected static final Handle gtk_tree_model_iter_children(Handle treeModel,
                                                           Handle parent)


gtk_tree_model_iter_has_child

protected static final boolean gtk_tree_model_iter_has_child(Handle treeModel,
                                                             Handle iter)


gtk_tree_model_iter_n_children

protected static final int gtk_tree_model_iter_n_children(Handle treeModel,
                                                          Handle iter)


gtk_tree_model_iter_next

protected static final Handle gtk_tree_model_iter_next(Handle treeModel,
                                                       Handle iter)


gtk_tree_model_iter_nth_child

protected static final Handle gtk_tree_model_iter_nth_child(Handle treeModel,
                                                            Handle parent,
                                                            int n)


gtk_tree_model_iter_parent

protected static final Handle gtk_tree_model_iter_parent(Handle treeModel,
                                                         Handle child)


toString

public String toString()
Generates a string representation of the iter. This string is a ':' separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.