ca.odell.glazedlists.swing
Interface TableModelEventAdapter<E>

Type Parameters:
E - list element type
All Superinterfaces:
EventListener, ListEventListener<E>

public interface TableModelEventAdapter<E>
extends ListEventListener<E>

A TableModelEventAdapter is used by a DefaultEventTableModel for converting list events to table model events. The adapter is also responsible for firing the created TableModelEvents. It offers convience methods for firing special table model events.

A particular TableModelEventAdapter is usually created via an implementation of TableModelEventAdapter.Factory and then passed to the table model.

Author:
Holger Brands
See Also:
DefaultEventTableModel.setEventAdapter(TableModelEventAdapter)

Nested Class Summary
static interface TableModelEventAdapter.Factory<E>
          Factory for creating TableModelEventAdapters.
 
Method Summary
 void fireTableChanged(int startIndex, int endIndex, int listChangeType)
          Notifies all listeners that rows in the range [startIndex, endIndex], inclusive, have been changed (inserted, updated or deleted).
 void fireTableDataChanged()
          Notifies all listeners that all cell values in the table's rows may have changed.
 void fireTableStructureChanged()
          Notifies all listeners that the table's structure has changed.
 
Methods inherited from interface ca.odell.glazedlists.event.ListEventListener
listChanged
 

Method Detail

fireTableStructureChanged

void fireTableStructureChanged()
Notifies all listeners that the table's structure has changed. The number of columns in the table, and the names and types of the new columns may be different from the previous state. If the JTable receives this event and its autoCreateColumnsFromModel flag is set it discards any table columns that it had and reallocates default columns in the order they appear in the model. This is the same as calling setModel(TableModel) on the JTable.

See Also:
AbstractTableModel.fireTableStructureChanged()

fireTableDataChanged

void fireTableDataChanged()
Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.

See Also:
AbstractTableModel.fireTableDataChanged()

fireTableChanged

void fireTableChanged(int startIndex,
                      int endIndex,
                      int listChangeType)
Notifies all listeners that rows in the range [startIndex, endIndex], inclusive, have been changed (inserted, updated or deleted).

Parameters:
startIndex - the first row index
endIndex - the last row index
listChangeType - the list change type (insert, update or delete)
See Also:
ListEvent, TableModelEvent


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58