|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TableModel
A model of a table. The model is thread-safe, synchronized on itself. Any iteration over values should include synchronization on the instance of this class.
| Nested Class Summary | |
|---|---|
static class |
TableModel.Cell<C>
A lightweight class representing a row and column in a table. |
| Field Summary |
|---|
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Method Summary | ||
|---|---|---|
|
getCellValue(int rowIndex,
TableColumnModel<C> column)
Returns the cell value at the given row and column. |
|
|
getCellValue(TableModel.Cell<C> cell)
Returns the cell value for the given cell. |
|
int |
getColumnCount()
|
|
int |
getColumnIndex(TableColumnModel<?> column)
Determines the logical index of the given table column. |
|
java.util.List<TableColumnModel<?>> |
getColumns()
|
|
int |
getRowCount()
|
|
|
setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
Sets the cell value at the given row and column. |
|
|
setCellValue(TableModel.Cell<C> cell,
C newCellValue)
Sets the cell value for the given cell. |
|
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Method Detail |
|---|
int getColumnIndex(TableColumnModel<?> column)
column - One of the table columns.
java.util.List<TableColumnModel<?>> getColumns()
int getRowCount()
int getColumnCount()
<C> C getCellValue(TableModel.Cell<C> cell)
getCellValue(int, TableColumnModel).
C - The type of cell value.cell - The cell containing the row index and column information.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
<C> C getCellValue(int rowIndex,
TableColumnModel<C> column)
C - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
<C> void setCellValue(TableModel.Cell<C> cell,
C newCellValue)
setCellValue(int, TableColumnModel, Object).
C - The type of cell value.cell - The cell containing the row index and column information.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
<C> void setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
C - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||