|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.GridTableModel
Converts a linear ListModel to a grid of items.
For example, A B C D E F G
becomes:
The extraneous cells in the table are filled
with
A D G
B E .
C F .
GridTableModel.PLACEHOLDER
.
Field Summary | |
static String |
versionId
|
Constructor Summary | |
GridTableModel(ListModel items,
int cols)
Constructs a new GridTableModel . |
Method Summary | |
int |
getColumnCount()
Return the number of columns this table model has. |
Object |
getElementAt(int columnIndex)
Return the data element for the given column and the current row. |
Object |
getKeyAt(int columnIndex)
Return the key for the given column and the current row. |
boolean |
nextRow()
Move to the next row and return true if the model is now positioned on a valid row. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public GridTableModel(ListModel items, int cols)
GridTableModel
.
items
- a ListModel
that represents the
itemscols
- the number of columns in the gridMethod Detail |
public int getColumnCount()
TableModel
getColumnCount
in interface TableModel
public boolean nextRow()
TableModel
getElementAt
and getKeyAt
.
If this method returns true
, subsequent calls to
getElementAt
and getKeyAt
have
to succeed and return non-null objects. If this method returns
false
, the table assumes that it has traversed all the
data contained in this model.
nextRow
in interface TableModel
true
if the model is positioned on a valid rowpublic Object getElementAt(int columnIndex)
TableModel
value
argument without modifications.
getElementAt
in interface TableModel
columnIndex
- the number of the column for which to get data
TableCellRenderer
public Object getKeyAt(int columnIndex)
TableModel
key
argument.
getKeyAt
in interface TableModel
columnIndex
- the number of the column for which to get data
TableCellRenderer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |