|
|||||||||
| 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.GObject
org.gnu.gtk.TreeModel
org.gnu.gtk.ListStore
org.gnome.gtk.ListStore.
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 ListStore
The ListStore is the gtk Model used for constructing Lists and tables to be
displayed within TreeView widgets. For full details of what objects
are needed to construct lists and tables, please see the TreeView
description.
The list store has a number of DataColumns, or data 'columns'
associated with it. These do not correspond to the organisation of
the output into columns. The data store can in fact be used with any number
of treeView widgets, each displaying a different part of the data. In these
Java bindings, we will try to use the term dataBlock for the data in the
ListStore and Column to refer to the columns to be displayed. The data to be
displayed is set in the TreeViewColumn objects, by associating
properties of CellRenderer's with the data block used in this
object.
| Constructor Summary | |
|---|---|
ListStore(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. |
|
| Method Summary | |
|---|---|
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. |
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. |
TreeIter |
appendRow()
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. |
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. |
java.util.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. |
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. |
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. |
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. |
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. |
static org.gnu.glib.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. |
int |
handleCompareFunc(org.gnu.glib.Handle model,
org.gnu.glib.Handle aIter,
org.gnu.glib.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. |
TreeIter |
insertRow(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. |
TreeIter |
insertRowAfter(TreeIter sibling)
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. |
TreeIter |
insertRowBefore(TreeIter sibling)
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. |
boolean |
isIterValid(TreeIter iter)
Deprecated. |
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. |
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. |
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. |
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. |
TreeIter |
prependRow()
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. |
boolean |
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. |
void |
reorder(int[] newOrder)
Deprecated. |
void |
setColumnTypes(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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
void |
setValue(TreeIter iter,
DataColumnObject dataBlock,
java.lang.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. |
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. |
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. |
void |
setValue(TreeIter iter,
DataColumnString dataBlock,
java.lang.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. |
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. |
| 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 |
| Methods inherited from class org.gnu.glib.GObject |
|---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify |
| Methods inherited from class org.gnu.glib.Struct |
|---|
equals, getHandle, getNullHandle, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gnu.gtk.TreeSortable |
|---|
getHandle |
| Constructor Detail |
|---|
public ListStore(DataColumn[] dataColumns)
dataColumns - a list of dataColumns for the store. These should be created
as private variables of the required type - they will be
needed later.| Method Detail |
|---|
public void addRow(DataRow aRow)
DataColumn type
specified in the constructor of ListStore. 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.
aRow - a row to be added to the list
public void addRowAt(DataRow aRow,
int aPosition)
DataColumn type specified in the constructor of ListStore.
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.
aRow - a row to be added to the listpublic DataRow getRowAt(TreeIter aIter)
aIter. There
are several ways you can get a TreeIter to pass; for
example: using methods like getIter and
getFirstIter(), or from a TreeSelection.
aIter - the iter pointing to the row
DataRow filled with the values of the row.TreeModel.getIter(String),
TreeModel.getIter(TreePath),
TreeModel.getFirstIter(),
TreeSelection
public void setRowAt(DataRow aRow,
TreeIter aIter)
aIter to the values stored in
aRow.
aRow - a row with itemsaIter - a TreeIter pointing to a row in the tree.getRowAt(TreeIter)public void setColumnTypes(DataColumn[] dataColumns)
dataColumns - the data columns to be setpublic DataColumn getDataColumn(int aCol)
aCol as a
DataColumn. This is similar to calling
getType(int); the difference is that this method returns
the type as a DataColumn, which is a more high-level structure.
aCol - the column index
public java.util.List getAllDataColumns()
List with the types for every column as a
DataColumn object.
DataColumn's
public void setValue(TreeIter iter,
DataColumnString dataBlock,
java.lang.String value)
TreeViewColumn.
iter - A valid iterator which specifies the row in which the data
should be set. Iterators can be gained by using methods such
as appendRow().dataBlock - The data block to store the value in.value - The value to store. This must be of the same type
for the column as that set in the constructor to the
ListStore.
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.
dataBlock - The datablock in which the data should be stored.iter - Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as
appendRow().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.
dataBlock - The datablock in which the data should be stored.iter - Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as
appendRow().value - The value to be set.
public void setValue(TreeIter iter,
DataColumnInt dataBlock,
int value)
TreeViewColumn.
iter - A valid iterator which specifies the row in which the data
should be set. Iterators can be gained by using methods such
as appendRow().dataBlock - The data block to store the value in.value - The value to store. This must be of the same type
for the column as that set in the constructor to the
ListStore.
public void setValue(TreeIter iter,
DataColumnLong dataBlock,
long 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.
dataBlock - The datablock in which the data should be stored.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 long value to set into this row.
public void setValue(TreeIter iter,
DataColumnBoolean dataBlock,
boolean value)
TreeViewColumn.
iter - A valid iterator which specifies the row in which the data
should be set. Iterators can be gained by using methods such
as appendRow().dataBlock - The data block to store the value in.value - The value to store. This must be of the same type
for the column as that set in the constructor to the
ListStore.
public void setValue(TreeIter iter,
DataColumnDouble dataBlock,
double value)
TreeViewColumn.
iter - A valid iterator which specifies the row in which the data
should be set. Iterators can be gained by using methods such
as appendRow().dataBlock - The data block to store the value in.value - The value to store.
public void setValue(TreeIter iter,
DataColumnObject dataBlock,
java.lang.Object value)
dataBlock - The datablock in which the data should be stored.iter - Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as
appendRow().value - The value to be set.
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
dataBlock - The datablock in which the data should be stored.iter - Valid iterator for the data row in which the value is to be
set. These can be gotten using methods such as
appendRow().value - The value to be set. This must match the type for
that dataBlock, as set in the constructor.public boolean removeRow(TreeIter iter)
iter is set to be the next valid row, or invalidated if it
pointed to the last row in this store.
iter - iterator for the row to be removed.
public TreeIter insertRow(int position)
position. If position is larger than
the number of rows on the list, then the new row will be appended to the
list.
position - The position to place the new row, starting at 0.
public TreeIter insertRowBefore(TreeIter sibling)
sibling -
public TreeIter insertRowAfter(TreeIter sibling)
sibling -
public TreeIter prependRow()
public TreeIter appendRow()
public void clear()
public static org.gnu.glib.Type getType()
public void setSortColumn(DataColumn column,
SortType order)
setSortColumn in interface TreeSortablepublic DataColumn getSortColumn()
DataColumn.equals(org.gnu.gtk.DataColumn) method.
getSortColumn in interface TreeSortablepublic SortType getSortOrder()
getSortOrder in interface TreeSortable
public void setSortMethod(TreeIterComparison method,
DataColumn column)
setSortMethod in interface TreeSortable
public int handleCompareFunc(org.gnu.glib.Handle model,
org.gnu.glib.Handle aIter,
org.gnu.glib.Handle bIter,
int col)
handleCompareFunc in interface TreeSortablepublic void setDragDestListener(TreeDragDestListener listener)
setDragDestListener in interface TreeDragDestpublic 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(int[] newOrder)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||