|
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.TreeRowReference
public final class TreeRowReference
A stable reference to a specific row in a TreeModel. A TreeRowReference listens to all changes made to the model (be they insertions, deletions, sorting being applied, etc) and adjusts itself internally so that the same row is pointed at by the instance regardless.
This class is primarily necessary because a TreeIter instance is no longer usable if the model changes. Neither are TreePaths for that matter; if you change the sorting order then the row pointed at by TreePath "2" will [likely] be different before and after the sort.
Typical usage of this is from a TreeIter as follows:
TreeModel source; TreePath path; TreeIter row; TreeRowReference ref; ... path = source.getPath(row); ref = new TreeRowReference(source, path);
Constructor Summary | |
---|---|
TreeRowReference(TreeModel model,
TreePath path)
Construct a new TreeRowReference for the given TreePath into the given Model. |
Method Summary | |
---|---|
TreePath |
getPath()
Get a TreePath representing the row that this TreeRowReference is currently pointing at. |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreeRowReference(TreeModel model, TreePath path)
Method Detail |
---|
public TreePath getPath()
null
back if the TreeRowReference is no
longer valid, which would happen if the row has been deleted.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |