TableModel
Base class for models of Table.
Module | require("yue.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