Module com.googlecode.lanterna
Interface TableModel.Listener<V>
- Type Parameters:
V
- Value type stored in the table
- Enclosing class:
TableModel<V>
public static interface TableModel.Listener<V>
Listener interface for the
TableModel
class which can be attached to a TableModel
to be notified
of changes to the table model.-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCellChanged
(TableModel<V> model, int row, int column, V oldValue, V newValue) Called when an existing cell had its content updatedvoid
onColumnAdded
(TableModel<V> model, int index) Called when a new column has been added to the modelvoid
onColumnRemoved
(TableModel<V> model, int index, String oldHeader, List<V> oldColumn) Called when a column has been removed from the modelvoid
onRowAdded
(TableModel<V> model, int index) Called when a new row has been added to the modelvoid
onRowRemoved
(TableModel<V> model, int index, List<V> oldRow) Called when a row has been removed from the model
-
Method Details
-
onRowAdded
Called when a new row has been added to the model- Parameters:
model
- Model the row was added toindex
- Index of the new row
-
onRowRemoved
Called when a row has been removed from the model- Parameters:
model
- Model the row was removed fromindex
- Index of the removed rowoldRow
- Content of the row that was removed
-
onColumnAdded
Called when a new column has been added to the model- Parameters:
model
- Model the column was added toindex
- Index of the new column
-
onColumnRemoved
Called when a column has been removed from the model- Parameters:
model
- Model the column was removed fromindex
- Index of the removed columnoldHeader
- Header the removed column hadoldColumn
- Values in the removed column
-
onCellChanged
Called when an existing cell had its content updated- Parameters:
model
- Model that was modifiedrow
- Row index of the modified cellcolumn
- Column index of the modified celloldValue
- Previous value of the cellnewValue
- New value of the cell
-