org.gnu.gtk
Class DataRow
public class DataRow
extends java.lang.Object
A DataRow is simply a list of data, which represent a row that can be added
to store components, such as
ListStore
and
TreeStore
.
To create a DataRow and add it to a store is pretty straight forward:
store.addRow(new DataRow() .add(name) .add(type) .add(icon));
DataRow | add(Object aData) - Adds a data to this row.
|
Object | get(int aCol) - Get the data at column
aCol
|
List | getAll() - Get all data in this row.
|
add
public DataRow add(Object aData)
Adds a data to this row. This will fill the columns of the row
sequentially: the first call is the first column, and so it goes.
aData
- a data to be added to the row
- this DataRow. The reason why it returns this object is so you can
make useful constructions, such as:
new DataRow() .add(name) .add(type) .add(icon)
get
public Object get(int aCol)
Get the data at column aCol
aCol
- the column number, starting from 0.
getAll
public List getAll()
Get all data in this row.
- a List, with the data of each row.