|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--de.kosi.util.AbstractDistributedListTableModel
This class implements a TableModel on top of a DistributedList.
The rows are the items in the list. The columns are in most cases
fields of the items, but can be dtermined by the concrete implementations
of the AbstractDistributedListTableModel.
The AbstractDistributedListTableModel caches values from the items in the
list, so using it should save some bandwidth.
The data of items is only loaded in the list, when it is requested. This way
only data is loaded, that is really needed.
Upon the first call INVALID_OBJECT is returned. After the requested Object is
cached, an update event is fired, so the new values can be displayed.
The TableModel may be disconnected from the distributed list, when there is
no need to update it. After reconnecting the new entries are fetched.
ChangeLog:
$Log: AbstractDistributedListTableModel.java,v $ Revision 1.6 2001/08/02 11:58:40 jiriki Worked on tournament Revision 1.5 2001/07/31 13:00:27 jiriki Worked on Tournament Revision 1.4 2001/07/26 09:06:20 tanni protokolle view user angefangen Revision 1.3 2001/07/20 13:01:41 jiriki Start of BugFixing Revision 1.2 2001/06/04 14:21:10 jiriki Made source more comliant to coding guidelines. Revision 1.1.1.1 2001/04/29 18:05:19 jiriki Imported sources from zola. Revision 1.10 2001/04/11 17:40:49 wombat Updated Documentation. Revision 1.9 2001/04/11 16:54:04 wombat Removed some bugs when joining table and immidiatly leaving again. Revision 1.8 2001/04/11 12:34:32 wombat jar files restructured. Revision 1.7 2001/03/01 21:28:14 wombat Updated TestClient Resolved some bugs Revision 1.6 2001/02/25 23:16:05 wombat - deadlock vermeidung umgestellt. - ListenerList erstellt Revision 1.5 2001/02/19 23:21:16 wombat Added SSL Support, Implement DistributedListFilter Revision 1.4 2001/02/02 10:59:15 wombat Updated Documentationm
Inner Class Summary | |
protected static interface |
AbstractDistributedListTableModel.ListEntry
Interface for an entry in the list. |
Field Summary | |
static java.lang.Object |
INVALID_OBJECT
Value that is returned, when there are no cached values. |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
AbstractDistributedListTableModel(DistributedList list,
DistributedListFilter filter)
Creates a new TableModel. |
Method Summary | |
void |
connect()
Connects to the list. |
protected abstract AbstractDistributedListTableModel.ListEntry |
createListEntry(java.lang.Object obj)
Creates a new entry for the list. |
void |
disconnect()
Disconnects from the list. |
protected void |
dispatchEvent(DistributedListEvent event)
Dispatches an event received from the Distributed List |
abstract int |
getColumnCount()
Returns the number of columns of this model. |
java.lang.String |
getColumnName(int column)
|
protected java.util.List |
getEntries()
Returns the entries of this list. |
int |
getRowCount()
Returns the number of rows. |
java.lang.Object |
getValueAt(int row,
int column)
Returns a value in the model. |
boolean |
isConnected()
Returns the connection status. |
protected void |
setColumnName(int column,
java.lang.String name)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Object INVALID_OBJECT
Constructor Detail |
public AbstractDistributedListTableModel(DistributedList list, DistributedListFilter filter) throws java.rmi.RemoteException, InvalidSessionException
list
- list this TableModel is based on.filter
- filter for this tablemodel.java.rmi.RemoteException
- if the remote call fails.InvalidSessionException
- when not called from within a valid
session context.Method Detail |
public void connect() throws java.rmi.RemoteException, InvalidSessionException
java.rmi.RemoteException
- if the remote call fails.InvalidSessionException
- when not called from within a valid
session context.public java.lang.String getColumnName(int column)
getColumnName
in class javax.swing.table.AbstractTableModel
protected void setColumnName(int column, java.lang.String name)
public void disconnect() throws java.rmi.RemoteException
java.rmi.RemoteException
- if the remote call fails.public boolean isConnected()
protected java.util.List getEntries()
protected abstract AbstractDistributedListTableModel.ListEntry createListEntry(java.lang.Object obj)
obj
- object a entry is created for.public abstract int getColumnCount()
getColumnCount
in class javax.swing.table.AbstractTableModel
public int getRowCount()
getRowCount
in class javax.swing.table.AbstractTableModel
public java.lang.Object getValueAt(int row, int column)
getValueAt
in class javax.swing.table.AbstractTableModel
row
- Row a value is returned for.column
- Column a value is returned for.protected void dispatchEvent(DistributedListEvent event)
event
- event to dispatch.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |