|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
com.sciapp.table.TableMap
com.sciapp.table.remote.DefaultRemoteTableModel
public class DefaultRemoteTableModel
DefaultRemoteTableModel is the default implementation of a RemoteTableModel. This class wraps around a cacheable table model and uses an internal thread in order to asynchronously retrieve the data from the underlying model.
Field Summary | |
---|---|
protected CacheableTableModel |
cacheTableModel
the cacheable table model to query. |
protected DefaultPendingValue |
pendingValue
the default object to return when a cell value is pending. |
Fields inherited from class com.sciapp.table.TableMap |
---|
tableModel |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultRemoteTableModel(CacheableTableModel model)
Constructs a DefaultRemoteTableModel. |
Method Summary | |
---|---|
void |
addRemoteTableListener(RemoteTableListener l)
Adds a RemoteTableListener that is notified each time the RemoteTableModel will start or stop querying the underlying table model. |
void |
fireRemoteAction(int type)
Notifies listeners of this RemoteTableModel's status. |
CacheableTableModel |
getCacheableModel()
Returns the cacheable model. |
Object |
getPendingValue(int row,
int column)
Returns the object to display if a cell value is pending. |
int |
getRowCount()
Returns tableModel.getRowCount |
Object |
getValueAt(int row,
int column)
Returns tableModel.getValueAt |
void |
removeRemoteTableListener(RemoteTableListener l)
Removes a RemoteTableListener from the list that is notified each time the RemoteTableModel will start or stop querying the underlying table model. |
void |
setModel(TableModel model)
Sets the underlying TableModel to newModel. |
void |
stop()
Stops the thread that asynchronously queries the underlying cacheable table model. |
Methods inherited from class com.sciapp.table.TableMap |
---|
addReorderListener, fireRowsMapped, fireRowsReordered, getColumnClass, getColumnCount, getColumnName, getModel, isCellEditable, removeReorderListener, rowsReordered, setValueAt, tableChanged |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, isCellEditable, removeTableModelListener, setValueAt |
Field Detail |
---|
protected CacheableTableModel cacheTableModel
protected DefaultPendingValue pendingValue
Constructor Detail |
---|
public DefaultRemoteTableModel(CacheableTableModel model)
Method Detail |
---|
public void addRemoteTableListener(RemoteTableListener l)
addRemoteTableListener
in interface RemoteTableModel
l
- the RemoteTableListener to addpublic void fireRemoteAction(int type)
type
- the type of the event - either STARTED or STOPPED.public CacheableTableModel getCacheableModel()
public Object getPendingValue(int row, int column)
getPendingValue
in interface RemoteTableModel
row
- the cell's row indexcolumn
- the cell's column index
public int getRowCount()
getRowCount
in interface TableModel
getRowCount
in class TableMap
TableModel.getColumnCount()
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
getValueAt
in class TableMap
row
- the row whose value is to be queriedcolumn
- the column whose value is to be queried
public void removeRemoteTableListener(RemoteTableListener l)
removeRemoteTableListener
in interface RemoteTableModel
l
- the RemoteTableListener to removepublic void setModel(TableModel model)
setModel
in class TableMap
model
- the new TableModel to assign.public void stop()
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |