AbstractTableModel
Implement a custom TableModel.
Module | require("yue.gui") |
Type | Class |
Inherits | TableModel |
To implement a custom TableModel
, please implement all the methods
in the Delegates section. It is also required to call the Notify
methods of
TableModel
super class when data has been changed, so the
Table
can correctly update.
For simple use cases, the SimpleTableModel
can be used.
Delegates
getrowcount(self)
Return how many rows are in the model.
Parameters
AbstractTableModel
self
Return
integer
getvalue(self, column, row)
Return the data at column
and row
.
Parameters
AbstractTableModel
selfinteger
columninteger
row
Return
any
setvalue(self, column, row, value)
Change the value
at column
and row
.
Parameters
AbstractTableModel
selfinteger
columninteger
rowany
value