public abstract class AbstractTableModel extends java.lang.Object implements java.io.Serializable, TableModel
TableModel.
This class provides the following conveniences for TableModel
implementation development:
getColumnClass() which
returns Object.classgetColumnName() which
returns "spreadsheet-style" column names, i.e.,
A, B, C...Y, Z, AA, AB, AC....DefaultTableModel,
Serialized Form| Constructor and Description |
|---|
AbstractTableModel()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTableModelListener(TableModelListener l)
Adds a listener that will be notified of changes.
|
void |
fireTableCellUpdated(int column,
int row)
Notifies
TableModelListeners that the contents of the cell
at the specified coordinate were changed. |
void |
fireTableChanged(TableModelEvent e)
Notifies
TableModelListeners of the specified event. |
void |
fireTableDataChanged()
Notifies
TableModelListeners that the content of the table
(possibly including the number of rows) was changed, but that the table's
structure has remained intact. |
void |
fireTableRowsDeleted(int firstRow,
int lastRow)
Notifies
TableModelListeners that rows from
firstRow to lastRow were deleted. |
void |
fireTableRowsInserted(int firstRow,
int lastRow)
Notifies
TableModelListeners that the rows from
firstRow to lastRow were inserted. |
void |
fireTableRowsUpdated(int firstRow,
int lastRow)
Notifies
TableModelListeners that the data in the rows
from firstRow to lastRow was updated. |
void |
fireTableStructureChanged()
Notifies
TableModelListener that all data in the table may
have changed, including the size and structure of the table. |
java.lang.Class |
getColumnClass(int column)
Returns
Object.class |
java.lang.String |
getColumnName(int column)
Returns column names using a "spreadsheet-style" convention, i.e.,
A, B, C...Y, Z, AA, AB, AC...
|
EventListenerList |
getEventListenerList()
Returns the
EventListenerList used to register listeners. |
void |
removeTableModelListener(TableModelListener l)
Removes a listener from being notified of changes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumnCount, getRowCount, getValueAtpublic void addTableModelListener(TableModelListener l)
TableModeladdTableModelListener in interface TableModell - the listener to addTableModel.addTableModelListener(nextapp.echo.app.event.TableModelListener)public void fireTableCellUpdated(int column,
int row)
TableModelListeners that the contents of the cell
at the specified coordinate were changed.column - the column indexrow - the row indexpublic void fireTableDataChanged()
TableModelListeners that the content of the table
(possibly including the number of rows) was changed, but that the table's
structure has remained intact.public void fireTableRowsDeleted(int firstRow,
int lastRow)
TableModelListeners that rows from
firstRow to lastRow were deleted.firstRow - the index of the first deleted rowlastRow - the index of the last deleted rowpublic void fireTableRowsInserted(int firstRow,
int lastRow)
TableModelListeners that the rows from
firstRow to lastRow were inserted.firstRow - the index of the first inserted rowlastRow - the index of the last inserted rowpublic void fireTableRowsUpdated(int firstRow,
int lastRow)
TableModelListeners that the data in the rows
from firstRow to lastRow was updated.
in the specified rows was updated.firstRow - the index of the first inserted rowlastRow - the index of the last inserted rowpublic void fireTableStructureChanged()
TableModelListener that all data in the table may
have changed, including the size and structure of the table.public void fireTableChanged(TableModelEvent e)
TableModelListeners of the specified event.e - the eventpublic java.lang.Class getColumnClass(int column)
Object.classgetColumnClass in interface TableModelcolumn - the column index (0-based)TableModel.getColumnClass(int)public java.lang.String getColumnName(int column)
getColumnName in interface TableModelcolumn - the column index (0-based)TableModel.getColumnName(int)public EventListenerList getEventListenerList()
EventListenerList used to register listeners.EventListenerListpublic void removeTableModelListener(TableModelListener l)
TableModelremoveTableModelListener in interface TableModell - the listener to removeTableModel.removeTableModelListener(nextapp.echo.app.event.TableModelListener)