E - list element typepublic interface TableModelEventAdapter<E> extends ListEventListener<E>
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.
DefaultEventTableModel.setEventAdapter(TableModelEventAdapter)| Modifier and Type | Interface and Description |
|---|---|
static interface |
TableModelEventAdapter.Factory<E>
Factory for creating
TableModelEventAdapters. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
listChangedvoid fireTableStructureChanged()
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.AbstractTableModel.fireTableStructureChanged()void fireTableDataChanged()
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.AbstractTableModel.fireTableDataChanged()void fireTableChanged(int startIndex,
int endIndex,
int listChangeType)
[startIndex, endIndex], inclusive, have been changed (inserted,
updated or deleted).startIndex - the first row indexendIndex - the last row indexlistChangeType - the list change type (insert, update or delete)ListEvent,
TableModelEventGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019