|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.table.AbstractTableModel
public abstract class AbstractTableModel
An abstract implementation of a table model. This class provides listener
management and convenience methods for notifying listeners of events.
It provides generic implementations of getColumnClass() (which always returns
Object.class) and getColumnName() (which returns "spreadsheet-style" column
names). It also provides an empty implementation of setValueAt().
This class should be extended when you desire to create a TableModel which
is best served by a custom representation of its internal data.
DefaultTableModel,
Serialized Form| Field Summary | |
|---|---|
protected EventListenerList |
listenerList
A listener management facility. |
| Constructor Summary | |
|---|---|
AbstractTableModel()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addTableModelListener(TableModelListener l)
Adds a listener that will be notified of changes to the table model. |
void |
fireTableCellUpdated(int column,
int row)
Notifies listeners that the contents of the cell at the specified coordinate were changed. |
void |
fireTableChanged(TableModelEvent e)
Notifies all TableModelListeners of the specified event. |
void |
fireTableDataChanged()
Notifies listeners 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 listeners that rows the rows from firstRow to LastRow were deleted. |
void |
fireTableRowsInserted(int firstRow,
int lastRow)
Notifies listeners that rows the rows from firstRow to LastRow were inserted. |
void |
fireTableRowsUpdated(int firstRow,
int lastRow)
Notifies listeners that data found in the specified rows was updated. |
void |
fireTableStructureChanged()
Notifies all listeners 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 the value found at the given coordinate within the table. |
boolean |
isRowEditable(int row)
When a table model supports editing of data, this method will be called to query if a row is currently editable. |
void |
removeTableModelListener(TableModelListener l)
Removes a listener from being notified of changes to the table model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nextapp.echo.table.TableModel |
|---|
getColumnCount, getRowCount, getValueAt |
| Field Detail |
|---|
protected EventListenerList listenerList
| Constructor Detail |
|---|
public AbstractTableModel()
| Method Detail |
|---|
public void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModell - The listener to add.
public void fireTableCellUpdated(int column,
int row)
column - The column value of the cell that changed.row - The row value of the cell that changed.public void fireTableDataChanged()
public void fireTableRowsDeleted(int firstRow,
int lastRow)
firstRow - The first row that was deleted.lastRow - The last row that was deleted.
public void fireTableRowsInserted(int firstRow,
int lastRow)
firstRow - The first row of the new inserted rows.lastRow - The last row of the new inserted rows.
public void fireTableRowsUpdated(int firstRow,
int lastRow)
firstRow - The first row that was updated.lastRow - The last row that was updated.public void fireTableStructureChanged()
public void fireTableChanged(TableModelEvent e)
e - The event to send to the listeners.public java.lang.Class getColumnClass(int column)
getColumnClass in interface TableModelcolumn - The column number whose class is to be returned.
public java.lang.String getColumnName(int column)
getColumnName in interface TableModelcolumn - The column of the value to return.
public void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModell - The listener to remove.public boolean isRowEditable(int row)
TableModelWhen a table model supports editing of data, this method will be called to query if a row is currently editable.
isRowEditable in interface TableModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||