|
|||||||||||
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 | +--org.gnu.gtk.TreeStore
The TreeStore is a Model used for storing data which will be displayed in any
number of TreeView
widgets. For an overview of how the tree and list
objects fit together, see the TreeView
description.
Data is stored within this object in DataBlock
s. This
data is displayed in the widgets via CellRenderer
's; the mapping
between this data and the cell renderers of each treeview column is done in
the TreeViewColumn
class.
Constructor Summary | |
TreeStore(DataBlock[] dataBlocks)
Constructs a new TreeStore, defining the types for each datablock. |
Method Summary | |
TreeIter |
appendRow(TreeIter parent)
Appends a new row to tree_store. |
void |
clear()
Removes all items from the treestore. |
int |
getIteratorDepth(TreeIter iter)
Returns the depth of the iterator. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
TreeIter |
insertRow(TreeIter parent,
int position)
Creates a new row at position. |
TreeIter |
insertRowAfter(TreeIter sibling,
TreeIter parent)
Inserts a new row after sibling. |
TreeIter |
insertRowBefore(TreeIter sibling,
TreeIter parent)
Inserts a new row before sibling. |
boolean |
isAncestor(TreeIter iter,
TreeIter descendant)
Returns TRUE if iter is an ancestor of descendant. |
TreeIter |
prependRow(TreeIter parent)
Prepends a new row to the store. |
void |
removeRow(TreeIter iter)
Removes a row from the tree store. |
void |
setValue(TreeIter iter,
DataBlockBoolean dataBlock,
boolean value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataBlockDouble dataBlock,
double value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataBlockInt dataBlock,
int value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataBlockObject dataBlock,
java.lang.Object value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataBlockPixbuf dataBlock,
Pixbuf value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataBlockString dataBlock,
java.lang.String value)
Sets a value in the dataStore. |
Methods inherited from class org.gnu.gtk.TreeModel |
getDataBlockCount, getFirstChild, getFirstIter, getIter, getIter, getIterChildCount, getNextIter, getPath, getType, getValue, getValue, getValue, getValue, getValue, iterHasChild |
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 |
Constructor Detail |
public TreeStore(DataBlock[] dataBlocks)
Method Detail |
public void setValue(TreeIter iter, DataBlockString dataBlock, java.lang.String value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the dataiter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set.public void setValue(TreeIter iter, DataBlockInt dataBlock, int value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the dataiter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set.public void setValue(TreeIter iter, DataBlockBoolean dataBlock, boolean value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the dataiter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set.public void setValue(TreeIter iter, DataBlockDouble dataBlock, double value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the dataiter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set.public void setValue(TreeIter iter, DataBlockObject dataBlock, java.lang.Object value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the data, starting at
0.iter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set. This must match the type for
that dataBlock, as set in the constructor.public void setValue(TreeIter iter, DataBlockPixbuf dataBlock, Pixbuf value)
This does not
make the data visible in any of the widgets which use the class - to do
that, you have to construct a TreeViewColumn
and add it to the
TreeView
; construct and add a CellRenderer
to that; and
finally associate the properties of the CellRenderer with the dataBlocks,
using the TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute,
int)
method. @param dataBlock The datablock in which the data should be
stored.
dataBlock
- The data block in which to store the data, starting at
0.iter
- Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as appendRow(TreeIter)
.value
- The value to be set.public void removeRow(TreeIter iter)
iter
- Iterator representing the row.public TreeIter insertRow(TreeIter parent, int position)
parent
- A valid TreeIter, or NULLposition
- Position to insert the new row
public TreeIter insertRowBefore(TreeIter sibling, TreeIter parent)
parent
- A valid TreeIter, or NULLsibling
- A valid TreeIter, or NULL
public TreeIter insertRowAfter(TreeIter sibling, TreeIter parent)
parent
- A valid TreeIter, or NULLsibling
- A valid GtkTreeIter, or NULL
public TreeIter prependRow(TreeIter parent)
parent
- A valid TreeIter, or NULL
public TreeIter appendRow(TreeIter parent)
parent
- A valid TreeIter, or NULL
public boolean isAncestor(TreeIter iter, TreeIter descendant)
iter
- Row to be tested.descendant
- Descendant row for testing
public int getIteratorDepth(TreeIter iter)
iter
- The iterator to test the depth of
public void clear()
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 |