|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 DataColumn
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.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
TreeStore(DataColumn[] dataColumns)
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. |
DataColumn |
getSortColumn()
Get a DataColumn object representing the currently sorted column. |
SortType |
getSortOrder()
Get the current sorting order of the store. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
protected static Handle |
gtk_tree_store_append(Handle treeStore,
Handle parent)
|
protected static void |
gtk_tree_store_clear(Handle treeStore)
|
protected static int |
gtk_tree_store_get_type()
|
protected static Handle |
gtk_tree_store_insert_after(Handle treeStore,
Handle parent,
Handle sibling)
|
protected static Handle |
gtk_tree_store_insert_before(Handle treeStore,
Handle parent,
Handle sibling)
|
protected static Handle |
gtk_tree_store_insert(Handle treeStore,
Handle parent,
int position)
|
protected static boolean |
gtk_tree_store_is_ancestor(Handle treeStore,
Handle iter,
Handle descendant)
|
protected static int |
gtk_tree_store_iter_depth(Handle treeStore,
Handle iter)
|
protected static boolean |
gtk_tree_store_iter_is_valid(Handle treeStore,
Handle iter)
|
protected static void |
gtk_tree_store_move_after(Handle treeStore,
Handle iter,
Handle position)
|
protected static void |
gtk_tree_store_move_before(Handle treeStore,
Handle iter,
Handle position)
|
protected static Handle |
gtk_tree_store_newv(int numColumns,
int[] types)
|
protected static Handle |
gtk_tree_store_prepend(Handle treeStore,
Handle parent)
|
protected static void |
gtk_tree_store_remove(Handle treeStore,
Handle iter)
|
protected static void |
gtk_tree_store_reorder(Handle treeStore,
Handle iter,
int[] newOrder)
|
protected static void |
gtk_tree_store_set_column_types(Handle treeStore,
int numColumns,
int[] types)
|
protected static void |
gtk_tree_store_set_value(Handle treeStore,
Handle iter,
int columnt,
Handle value)
|
protected static void |
gtk_tree_store_swap(Handle treeStore,
Handle iterA,
Handle iterB)
|
int |
handleCompareFunc(Handle model,
Handle aIter,
Handle bIter,
int col)
Call-back method invoked by the JNI code when sorting is required. |
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. |
boolean |
isIterValid(TreeIter iter)
|
void |
moveRowAfter(TreeIter iter,
TreeIter position)
Moves iter in this store to the position after position. |
void |
moveRowBefore(TreeIter iter,
TreeIter position)
Moves iter in tree_store to the position before position. |
void |
moveRowToEnd(TreeIter iter)
Moves iter to the end of the model |
void |
moveRowToStart(TreeIter iter)
Moves iter in this store to the start of the store. |
TreeIter |
prependRow(TreeIter parent)
Prepends a new row to the store. |
void |
removeRow(TreeIter iter)
Removes a row from the tree store. |
void |
reorder(TreeIter iter,
int[] newOrder)
|
void |
setColumnTypes(DataColumn[] dataColumns)
|
void |
setDragDestListener(TreeDragDestListener listener)
|
void |
setDragSourceListener(TreeDragSourceListener listener)
|
void |
setSortColumn(DataColumn column,
SortType order)
Set the column in the list to sort on. |
void |
setSortMethod(TreeIterComparison method,
DataColumn column)
Set the class used to sort the list according to the values stored in the given DataColumn. |
void |
setValue(TreeIter iter,
DataColumnBoolean dataBlock,
boolean value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnDouble dataBlock,
double value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnIconSize dataBlock,
IconSize value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnInt dataBlock,
int value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnObject dataBlock,
java.lang.Object value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnPixbuf dataBlock,
Pixbuf value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnStockItem dataBlock,
GtkStockItem value)
Sets a value in the dataStore. |
void |
setValue(TreeIter iter,
DataColumnString dataBlock,
java.lang.String value)
Sets a value in the dataStore. |
void |
swapRows(TreeIter a,
TreeIter b)
Swaps a and b in the same level of tree_store. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.gnu.gtk.TreeSortable |
getHandle |
Constructor Detail |
public TreeStore(DataColumn[] dataColumns)
dataColumns
- Types for the data to be stored in the TreeStore.Method Detail |
public void setColumnTypes(DataColumn[] dataColumns)
public void setValue(TreeIter iter, DataColumnString 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,
DataColumn)
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, DataColumnStockItem dataBlock, GtkStockItem 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,
DataColumn)
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, DataColumnIconSize dataBlock, IconSize 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,
DataColumn)
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, DataColumnInt 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,
DataColumn)
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, DataColumnBoolean 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,
DataColumn)
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, DataColumnDouble 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,
DataColumn)
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, DataColumnObject 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,
DataColumn)
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, DataColumnPixbuf 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,
DataColumn)
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
- TreeIter 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()
public void setSortColumn(DataColumn column, SortType order)
setSortColumn
in interface TreeSortable
public DataColumn getSortColumn()
DataColumn.equals(org.gnu.gtk.DataColumn)
method.
getSortColumn
in interface TreeSortable
public SortType getSortOrder()
getSortOrder
in interface TreeSortable
public void setSortMethod(TreeIterComparison method, DataColumn column)
setSortMethod
in interface TreeSortable
public int handleCompareFunc(Handle model, Handle aIter, Handle bIter, int col)
handleCompareFunc
in interface TreeSortable
public void setDragDestListener(TreeDragDestListener listener)
setDragDestListener
in interface TreeDragDest
public void setDragSourceListener(TreeDragSourceListener listener)
setDragSourceListener
in interface TreeDragSource
public void swapRows(TreeIter a, TreeIter b)
public void moveRowToEnd(TreeIter iter)
public void moveRowAfter(TreeIter iter, TreeIter position)
public void moveRowToStart(TreeIter iter)
public void moveRowBefore(TreeIter iter, TreeIter position)
public boolean isIterValid(TreeIter iter)
public void reorder(TreeIter iter, int[] newOrder)
protected static final int gtk_tree_store_get_type()
protected static final Handle gtk_tree_store_newv(int numColumns, int[] types)
protected static final void gtk_tree_store_set_column_types(Handle treeStore, int numColumns, int[] types)
protected static final void gtk_tree_store_set_value(Handle treeStore, Handle iter, int columnt, Handle value)
protected static final void gtk_tree_store_remove(Handle treeStore, Handle iter)
protected static final Handle gtk_tree_store_insert(Handle treeStore, Handle parent, int position)
protected static final Handle gtk_tree_store_insert_before(Handle treeStore, Handle parent, Handle sibling)
protected static final Handle gtk_tree_store_insert_after(Handle treeStore, Handle parent, Handle sibling)
protected static final Handle gtk_tree_store_prepend(Handle treeStore, Handle parent)
protected static final Handle gtk_tree_store_append(Handle treeStore, Handle parent)
protected static final boolean gtk_tree_store_is_ancestor(Handle treeStore, Handle iter, Handle descendant)
protected static final int gtk_tree_store_iter_depth(Handle treeStore, Handle iter)
protected static final void gtk_tree_store_clear(Handle treeStore)
protected static final boolean gtk_tree_store_iter_is_valid(Handle treeStore, Handle iter)
protected static final void gtk_tree_store_reorder(Handle treeStore, Handle iter, int[] newOrder)
protected static final void gtk_tree_store_swap(Handle treeStore, Handle iterA, Handle iterB)
protected static final void gtk_tree_store_move_before(Handle treeStore, Handle iter, Handle position)
protected static final void gtk_tree_store_move_after(Handle treeStore, Handle iter, Handle position)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |