|
|||||||||||
| 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 grid| Method Detail |
public int getColumnCount()
TableModel
getColumnCount in interface TableModelpublic boolean nextRow()
TableModelgetElementAt 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 TableModeltrue if the model is positioned on a valid rowpublic Object getElementAt(int columnIndex)
TableModelvalue argument without modifications.
getElementAt in interface TableModelcolumnIndex - the number of the column for which to get data
TableCellRendererpublic Object getKeyAt(int columnIndex)
TableModelkey
argument.
getKeyAt in interface TableModelcolumnIndex - 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 | ||||||||||