|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.Boxed
org.gnu.gtk.TreeRowReference
org.gnome.gtk.TreeRowReference
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.
public class TreeRowReference
A TreeRowReference behaves similar to a TreeIter
in that
it is a reference to a node in a javax.swing.tree.TreeModel
. With a
TreeRowReference however you don't need to worry about it becoming
invalidated when the underlying model changes. TreeRowReferences listen to
signals emitted by the model and modifies their state accordingly.
To create a TreeRowReference you need a reference to a
TreeModel
and a TreePath
:
TreeRowReference ref = new TreeRowReference(model, path)
TreeModel model = ref.getModel();
TreePath path = ref.getPath();
TreeRowReferences can become invalidated if the node they are pointing to no longer exists, you should check for this by using
ref.isValid()
Constructor Summary | |
---|---|
TreeRowReference(TreeModel model,
TreePath path)
Deprecated. Creates a row reference based on path. |
Method Summary | |
---|---|
TreeModel |
getModel()
Deprecated. |
TreePath |
getPath()
Deprecated. |
boolean |
isValid()
Deprecated. |
Methods inherited from class org.gnu.glib.Boxed |
---|
equals, getBoxedFromHandle, hashCode |
Methods inherited from class org.gnu.glib.Struct |
---|
getHandle, getNullHandle |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeRowReference(TreeModel model, TreePath path) throws java.lang.IllegalArgumentException
model
- The model the reference will usepath
- Valid TreePath to the node to keep a reference to
java.lang.IllegalArgumentException
Method Detail |
---|
public TreeModel getModel()
public TreePath getPath()
public boolean isValid()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |