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 theTableModelclass which can be attached to aTableModelto be notified of changes to the table model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCellChanged(TableModel<V> model, int row, int column, V oldValue, V newValue)Called when an existing cell had its content updatedvoidonColumnAdded(TableModel<V> model, int index)Called when a new column has been added to the modelvoidonColumnRemoved(TableModel<V> model, int index, java.lang.String oldHeader, java.util.List<V> oldColumn)Called when a column has been removed from the modelvoidonRowAdded(TableModel<V> model, int index)Called when a new row has been added to the modelvoidonRowRemoved(TableModel<V> model, int index, java.util.List<V> oldRow)Called when a row has been removed from the model
-
-
-
Method Detail
-
onRowAdded
void onRowAdded(TableModel<V> model, int index)
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
void onRowRemoved(TableModel<V> model, int index, java.util.List<V> oldRow)
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
void onColumnAdded(TableModel<V> model, int index)
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
void onColumnRemoved(TableModel<V> model, int index, java.lang.String oldHeader, java.util.List<V> oldColumn)
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
void onCellChanged(TableModel<V> model, int row, int column, V oldValue, V newValue)
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
-
-