public abstract class AbstractTableViewModel extends Object implements TableViewModel, Serializable
TableViewModel interface.| 限定符和类型 | 字段和说明 |
|---|---|
protected EventListenerList |
mListenerList
List of listeners
|
| 构造器和说明 |
|---|
AbstractTableViewModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTableViewModelListener(TableViewModelListener pListner)
Adds a listener to the list that's notified each time a change
to the data model occurs.
|
protected void |
fireTableChanged(TableViewModelEvent pEvent)
Forwards the given notification event to all
TableModelListeners that registered
themselves as listeners for this table model. |
protected void |
fireTableDataChanged()
Notifies all listeners that all cell values in the table's
rows may have changed.
|
protected void |
fireTableRowDeleted(Object pRowObject)
Notifies all listeners that row have been deleted.
|
protected void |
fireTableRowInserted(Object pRowObject)
Notifies all listeners that row have been inserted.
|
protected void |
fireTableRowsDeleted(Collection pRowObjects)
Notifies all listeners that row have been deleted.
|
protected void |
fireTableRowsInserted(Collection pRowObjects)
Notifies all listeners that row have been inserted.
|
protected void |
fireTableRowsUpdated(Collection pRowObjects)
Notifies all listeners that row have been updated.
|
protected void |
fireTableRowUpdated(Object pRowObject)
Notifies all listeners that the value of the row has been updated.
|
String |
getColumnName(int pColumn)
Returns a default name for the column using spreadsheet conventions:
A, B, C, ...
|
EventListener[] |
getListeners(Class pListenerType)
Returns an array of all the listeners of the given type that
were added to this model.
|
void |
removeTableViewModelListener(TableViewModelListener pListner)
Removes a listener from the list that's notified each time a
change to the data model occurs.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumns, getRowCount, getRowObjectprotected EventListenerList mListenerList
public String getColumnName(int pColumn)
column cannot be found,
returns an empty string.pColumn - the column being queriedcolumnpublic void addTableViewModelListener(TableViewModelListener pListner)
addTableViewModelListener 在接口中 TableViewModelpListner - the TableModelListenerpublic void removeTableViewModelListener(TableViewModelListener pListner)
removeTableViewModelListener 在接口中 TableViewModelpListner - the TableModelListenerprotected 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.TableModelEvent,
EventListenerListprotected void fireTableRowsInserted(Collection pRowObjects)
pRowObjects - the rowsTableModelEvent,
EventListenerListprotected void fireTableRowInserted(Object pRowObject)
pRowObject - the rowTableModelEvent,
EventListenerListprotected void fireTableRowsUpdated(Collection pRowObjects)
pRowObjects - the rowsTableModelEvent,
EventListenerListprotected void fireTableRowsDeleted(Collection pRowObjects)
pRowObjects - the rowsTableModelEvent,
EventListenerListprotected void fireTableRowDeleted(Object pRowObject)
pRowObject - the rowTableModelEvent,
EventListenerListprotected void fireTableRowUpdated(Object pRowObject)
pRowObject - the rowTableModelEvent,
EventListenerListprotected void fireTableChanged(TableViewModelEvent pEvent)
TableModelListeners that registered
themselves as listeners for this table model.pEvent - the event to be forwarded#addTableModelListener,
TableModelEvent,
EventListenerListpublic EventListener[] getListeners(Class pListenerType)
pListenerType - tistener class typelistenerType notifications from this modelCopyright © 2023 onecode. All rights reserved.