|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gtk.TreeModel
A generic tree interface for use with TreeView
widgets. Internally,
the TreeStore
and ListStore
objects are constructed on top of
TreeModels. If you were using the C version of gtk, you would be able to
construct other objects like those (although I find no reason for doing so).
This object provides a number of useful methods which can be used with either
the TreeStore or ListStore.
For a full overview of the tree, list and table widgets, please see the
TreeView
description.
Method Summary | |
int |
getDataBlockCount()
Returns the number of data blocks supported by the model |
TreeIter |
getFirstChild(TreeIter parent)
Returns an iterator for the first child of the given iterator, or null if the iter has no children. |
TreeIter |
getFirstIter()
Returns the iterator at the start of the model (the one at the path "0"), or returns null if the tree is empty. |
TreeIter |
getIter(java.lang.String pathString)
Returns a valid iterator pointing to the path represented by pathString , or returns null if the path is
invalid. |
TreeIter |
getIter(TreePath path)
Returns a valid iterator pointing to path , or
null / |
int |
getIterChildCount(TreeIter iter)
Returns the number of children that iter has |
TreeIter |
getNextIter(TreeIter iter)
Returns the next iter pointing to the node following the TreeIter
provided at the same level. |
TreePath |
getPath(TreeIter iter)
Returns a newly-created TreePath referenced by iter . |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
Type |
getType(int index)
Returns the type of the data block. |
boolean |
getValue(TreeIter iter,
DataBlockBoolean dataBlock)
Returns the Value at the given iter in the specified data block. |
double |
getValue(TreeIter iter,
DataBlockDouble dataBlock)
Returns the Value at the given iter in the specified data block. |
int |
getValue(TreeIter iter,
DataBlockInt dataBlock)
Returns the Value at the given iter in the specified data block. |
java.lang.Object |
getValue(TreeIter iter,
DataBlockObject dataBlock)
Returns the Value at the given iter in the specified data block. |
java.lang.String |
getValue(TreeIter iter,
DataBlockString dataBlock)
Returns the Value at the given iter in the specified data block. |
boolean |
iterHasChild(TreeIter iter)
Returns TRUE if iter has children, FALSE otherwise. |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getDataBlockCount()
public Type getType(int index)
index
- The index of the data blockpublic TreeIter getIter(TreePath path)
path
, or
null
/
public TreeIter getIter(java.lang.String pathString)
pathString
, or returns null
if the path is
invalid.
public TreeIter getFirstIter()
null
if the tree is empty.
public TreePath getPath(TreeIter iter)
TreePath
referenced by iter
.
public java.lang.String getValue(TreeIter iter, DataBlockString dataBlock)
public int getValue(TreeIter iter, DataBlockInt dataBlock)
public boolean getValue(TreeIter iter, DataBlockBoolean dataBlock)
public double getValue(TreeIter iter, DataBlockDouble dataBlock)
public java.lang.Object getValue(TreeIter iter, DataBlockObject dataBlock)
public TreeIter getNextIter(TreeIter iter)
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 getFirstIter()
to loop through
all values in the model.
public boolean iterHasChild(TreeIter iter)
public TreeIter getFirstChild(TreeIter parent)
null
if the iter has no children.
public int getIterChildCount(TreeIter iter)
iter
has
public static Type getType()
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |