TableModel
Base class for models of Table.
Module | require("gui") |
Type | Class |
For simple use cases, the SimpleTableModel
can be used.
For implementing a custom TableModel
, please see
AbstractTableModel
.
Methods
getRowCount()
Return how many rows are in the model.
Return
Integer
getValue(column, row)
Return the data at column
and row
.
Note that the returned value will be stored as primary types, native
objects (for example Image
s) can not be passed to renderer.
Parameters
Integer
columnInteger
row
Return
Any
setValue(column, row, value)
Change the value
at column
and row
.
Note that the value will be stored as primary types, native objects (for
example Image
s) can not be saved.
Parameters
Integer
columnInteger
rowAny
value
notifyRowInsertion(row)
Called by implementers to notify the table that a row is inserted.
Parameters
Integer
row
notifyRowDeletion(row)
Called by implementers to notify the table that a row is removed.
Parameters
Integer
row
notifyValueChange(column, row)
Called by implementers to notify the table that the value at column
and
row
has been changed.
Parameters
Integer
columnInteger
row