Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
GObject
org.gnu.gtk.TreeModel
org.gnu.gtk.TreeStore
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.
Constructor Summary | |
|
Method Summary | |
void | |
void | |
void | |
void | |
TreeIter | |
void |
|
List |
|
DataColumn |
|
int |
|
DataRow | |
DataColumn |
|
SortType |
|
static Type |
|
int |
|
TreeIter | |
TreeIter |
|
TreeIter |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
TreeIter |
|
void | |
void | |
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
Methods inherited from class org.gnu.gtk.TreeModel | |
addListener , getColumnCount , getDataBlockCount , getEventListenerClass , getEventType , getFirstIter , getIter , getIter , getType , getValue , getValue , getValue , getValue , getValue , getValue , getValue , getValue , getValue , removeListener |
public TreeStore(DataColumn[] dataColumns)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Constructs a new TreeStore, defining the types for each datablock. Subsequent setting of data to any of the datablocks must follow the types you set out here.
- Parameters:
dataColumns
- Types for the data to be stored in the TreeStore.
public void addRow(DataRow aRow)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Adds a row to the tree. This method can be used to easily add data to the tree. Each item in the DataRow must match theDataColumn
type specified in the constructor of TreeStore. For example, if it was passed{new DataColumnBoolean(), new DataColumnString()}
to the constructor, then the DataRow must contain a Boolean and a String object, respectively.
- Parameters:
aRow
- a row to be added to the list
public void addRow(DataRow aRow, TreeIter aParent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Adds a row to the tree. This method can be used to easily add data to the tree. Each item in the DataRow must match theDataColumn
type specified in the constructor of TreeStore. For example, if it was passed{new DataColumnBoolean(), new DataColumnString()}
to the constructor, then the DataRow must contain a Boolean and a String object, respectively.
- Parameters:
aRow
- a row to be added to the listaParent
- aTreeIter
pointing to a parent row.
public void addRowAt(DataRow aRow, int aPosition)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Adds a row to the tree, at the specified position. This method can be used to easily add data to the tree. Each item in the DataRow must match theDataColumn
type specified in the constructor of TreeStore. For example, if it was passed{new DataColumnBoolean(), new DataColumnString()}
to the constructor, then the DataRow must contain a Boolean and a String object, respectively.
- Parameters:
aRow
- a row to be added to the list
public void addRowAt(DataRow aRow, TreeIter aParent, int aPosition)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Adds a row to the tree, at the specified position. This method can be used to easily add data to the tree. Each item in the DataRow must match theDataColumn
type specified in the constructor of TreeStore. For example, if it was passed{new DataColumnBoolean(), new DataColumnString()}
to the constructor, then the DataRow must contain a Boolean and a String object, respectively.
- Parameters:
aRow
- a row to be added to the listaParent
- aTreeIter
pointing to a parent row.
public TreeIter appendRow(TreeIter parent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Appends a new row to tree_store. If parent is non-NULL, then it will append the new row after the last child of parent, otherwise it will append a row to the top level.
- Parameters:
parent
- A valid TreeIter, or NULL
- Returns:
- Iterator for the new row.
public void clear()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Removes all items from the treestore.
public List getAllDataColumns()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns aList
with the types for every column as aDataColumn
object.
- Returns:
- the list of
DataColumn
's
public DataColumn getDataColumn(int aCol)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the type of the columnaCol
as aDataColumn
. This is similar to callinggetType(int)
; the difference is that this method returns the type as a DataColumn, which is a more high-level structure.
- Parameters:
aCol
- the column index
- Returns:
- the corresponding DataColumn
public int getIteratorDepth(TreeIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the depth of the iterator. This will be 0 for anything on the root level, 1 for anything down a level, etc.
- Parameters:
iter
- The iterator to test the depth of
- Returns:
- Depth of the iterator.
public DataRow getRowAt(TreeIter aIter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets all the values in the row indicated byaIter
. There are several ways you can get aTreeIter
to pass; for example: using methods likegetIter
andgetFirstIter()
, or from aTreeSelection
.
- Parameters:
aIter
- the iter pointing to the row
- Returns:
- a
DataRow
filled with the values of the row.
public DataColumn getSortColumn()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Get a DataColumn object representing the currently sorted column. This is not the same DataColumn used to create the store. It is only of type DataColumn (not DataColumnString, etc). It can be compared with another DataColumn object using theDataColumn.equals(DataColumn)
method.
- Specified by:
- getSortColumn in interface TreeSortable
- Returns:
- A DataColumn object representing the currently sorted column or null if there is no column currently sorted.
public SortType getSortOrder()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Get the current sorting order of the store.
- Specified by:
- getSortOrder in interface TreeSortable
- Returns:
- A SortType object defining the current sorting order of the store or null if there is no current sort order.
public static Type getType()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieve the runtime type used by the GLib library.
public int handleCompareFunc(Handle model, Handle aIter, Handle bIter, int col)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Call-back method invoked by the JNI code when sorting is required. This is for internal use only.
- Specified by:
- handleCompareFunc in interface TreeSortable
public TreeIter insertRow(TreeIter parent, int position)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a new row at position. If parent is non-NULL, then the row will be made a child of parent. Otherwise, the row will be created at the toplevel. If position is larger than the number of rows at that level, then the new row will be inserted to the end of the list.
- Parameters:
parent
- A valid TreeIter, or NULLposition
- Position to insert the new row
- Returns:
- Iterator for the new row
public TreeIter insertRowAfter(TreeIter sibling, TreeIter parent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Inserts a new row after sibling. If sibling is NULL, then the row will be prepended to the beginning of the parent 's children. If parent and sibling are NULL, then the row will be prepended to the toplevel. If both sibling and parent are set, then parent must be the parent of sibling. When sibling is set, parent is optional.
- Parameters:
sibling
- A valid GtkTreeIter, or NULLparent
- A valid TreeIter, or NULL
- Returns:
- Iterator for the new row.
public TreeIter insertRowBefore(TreeIter sibling, TreeIter parent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Inserts a new row before sibling. If sibling is NULL, then the row will be appended to parent 's children. If parent and sibling are NULL, then the row will be appended to the toplevel. If both sibling and parent are set, then parent must be the parent of sibling. When sibling is set, parent is optional
- Parameters:
sibling
- A valid TreeIter, or NULLparent
- A valid TreeIter, or NULL
- Returns:
- Iterator for the new row.
public boolean isAncestor(TreeIter iter, TreeIter descendant)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns TRUE if iter is an ancestor of descendant. That is, iter is the parent (or grandparent or great-grandparent) of descendant.
- Parameters:
iter
- Row to be tested.descendant
- Descendant row for testing
- Returns:
- True of iter is an ancestor of descendant
public void moveRowAfter(TreeIter iter, TreeIter position)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves iter in this store to the position after position. iter and position should be in the same level. Note that this function only works with unsorted stores.
- Since:
- 2.2
public void moveRowBefore(TreeIter iter, TreeIter position)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves iter in tree_store to the position before position. iter and position should be in the same level. Note that this function only works with unsorted stores.
- Since:
- 2.2
public void moveRowToEnd(TreeIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves iter to the end of the model
- Since:
- 2.2
public void moveRowToStart(TreeIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves iter in this store to the start of the store.
- Since:
- 2.2
public TreeIter prependRow(TreeIter parent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Prepends a new row to the store. If parent is non-NULL, then it will prepend the new row before the first child of parent, otherwise it will prepend a row to the top level.
- Parameters:
parent
- A valid TreeIter, or NULL
- Returns:
- Iterator for the new row.
public void removeRow(TreeIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Removes a row from the tree store. After being removed, iter is set to the next valid row at that level, or invalidated if it previously pointed to the last one.
- Parameters:
iter
- TreeIter representing the row.
public void setDragDestListener(TreeDragDestListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
This method has not yet been implemented.
- Specified by:
- setDragDestListener in interface TreeDragDest
public void setDragSourceListener(TreeDragSourceListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
This method has not yet been implemented.
- Specified by:
- setDragSourceListener in interface TreeDragSource
public void setRowAt(DataRow aRow, TreeIter aIter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets all columns pointed byaIter
to the values stored inaRow
.
- Parameters:
aRow
- a row with itemsaIter
- aTreeIter
pointing to a row in the tree.
- See Also:
getRowAt(TreeIter)
public void setSortColumn(DataColumn column, SortType order)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set the column in the list to sort on.
- Specified by:
- setSortColumn in interface TreeSortable
public void setSortMethod(TreeIterComparison method, DataColumn column)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set the class used to sort the list according to the values stored in the given DataColumn.
- Specified by:
- setSortMethod in interface TreeSortable
public void setValue(TreeIter iter, DataColumnBoolean dataBlock, boolean value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
public void setValue(TreeIter iter, DataColumnDouble dataBlock, double value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
public void setValue(TreeIter iter, DataColumnIconSize dataBlock, IconSize value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
public void setValue(TreeIter iter, DataColumnInt dataBlock, int value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
- Since:
- 2.8.5
public void setValue(TreeIter iter, DataColumnLong dataBlock, long value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- Thelong
value to set into this row.
public void setValue(TreeIter iter, DataColumnObject dataBlock, Object value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The data block in which to store the data, starting at 0.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)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The data block in which to store the data, starting at 0.value
- The value to be set.
public void setValue(TreeIter iter, DataColumnStockItem dataBlock, GtkStockItem value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
public void setValue(TreeIter iter, DataColumnString dataBlock, String value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a value in the dataStore. The type of the value must match the type set for that dataBlock in the constructor. This does not make the data visible in any of the widgets which use the class - to do that, you have to construct aTreeViewColumn
and add it to theTreeView
; construct and add aCellRenderer
to that; and finally associate the properties of the CellRenderer with the dataBlocks, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
method.
- Parameters:
iter
- Valid iterator for the data row in which the value is to be set. These can be gotten using methods such asappendRow(TreeIter)
.dataBlock
- The datablock in which the data should be stored.value
- The value to be set.
public void swapRows(TreeIter a, TreeIter b)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Swaps a and b in the same level of tree_store. Note that this function only works with unsorted stores.
- Since:
- 2.2