java-gnome version 4.0.19

org.gnome.gtk
Class TreeIter

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.gnome.glib.Boxed
          extended by org.gnome.gtk.TreeIter

public final class TreeIter
extends Boxed

A temporary pointer to a row in a TreeModel. TreeIters are used to indicate a row in a TreeModel, either the "current" row if you are iterating over the data, or as an indication of which row a given event occurred on.

To obtain a new TreeIter, use one of the following:

Like other iterators in Java, a TreeIter becomes invalid the moment the underlying model changes. If you need a persistent pointer to a particular row, create a TreeRowReference.

Note that although one use case for TreeIter is to iterate through all the rows in a model, more often they are used to point to a single row (the one you are presently adding data to, or the one that was selected by the user); these aren't java.util.Iterators.

Since:
4.0.5
Author:
Andrew Cowie, Srichand Pendyala, Vreixo Formoso

Method Summary
 TreeIter copy()
          Create a copy of this TreeIter.
 boolean iterNext()
          Change this TreeIter to point to the row following the current one.
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

copy

public TreeIter copy()
Create a copy of this TreeIter.

Since:
4.0.14

iterNext

public boolean iterNext()
Change this TreeIter to point to the row following the current one. In a ListStore, this is simply the next row in the model, and what you use in conjunction with getIterFirst() to iterate through the entire model. In a TreeStore, however, it will return the next row at this level.

This will return true if it was able to change this TreeIter to the next row.

Be aware that when this returns false the TreeIter is no longer valid.

Since:
4.0.5


java-gnome