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 Type
    Method
    Description
    void
    onCellChanged(TableModel<V> model, int row, int column, V oldValue, V newValue)
    Called when an existing cell had its content updated
    void
    onColumnAdded(TableModel<V> model, int index)
    Called when a new column has been added to the model
    void
    onColumnRemoved(TableModel<V> model, int index, String oldHeader, List<V> oldColumn)
    Called when a column has been removed from the model
    void
    onRowAdded(TableModel<V> model, int index)
    Called when a new row has been added to the model
    void
    onRowRemoved(TableModel<V> model, int index, List<V> oldRow)
    Called when a row has been removed from the model
  • Method Details

    • 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 to
      index - Index of the new row
    • onRowRemoved

      void onRowRemoved(TableModel<V> model, int index, List<V> oldRow)
      Called when a row has been removed from the model
      Parameters:
      model - Model the row was removed from
      index - Index of the removed row
      oldRow - 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 to
      index - Index of the new column
    • onColumnRemoved

      void onColumnRemoved(TableModel<V> model, int index, String oldHeader, List<V> oldColumn)
      Called when a column has been removed from the model
      Parameters:
      model - Model the column was removed from
      index - Index of the removed column
      oldHeader - Header the removed column had
      oldColumn - 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 modified
      row - Row index of the modified cell
      column - Column index of the modified cell
      oldValue - Previous value of the cell
      newValue - New value of the cell