|
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.Objectcom.sciapp.treetable.AbstractTreeTableModel
com.sciapp.treetable.TreeModelMap
com.sciapp.table.remote.DefaultRemoteTreeTableModel
public class DefaultRemoteTreeTableModel
DefaultRemoteTreeTableModel is the default implementation of a RemoteTreeTableModel. This class wraps around a cacheable treetable model and uses an internal thread in order to asynchronously retrieve the data from the underlying model.
| Field Summary | |
|---|---|
protected CacheableTreeTableModel |
cacheTreeModel
the cacheable treetable model to query. |
protected Object |
pendingValue
the default object to return when a cell value is pending. |
| Fields inherited from class com.sciapp.treetable.TreeModelMap |
|---|
treeModel |
| Fields inherited from class com.sciapp.treetable.AbstractTreeTableModel |
|---|
listenerList, root |
| Fields inherited from interface com.sciapp.treetable.TreeTableModel |
|---|
CHANGE_COLUMN_SOURCE |
| Constructor Summary | |
|---|---|
DefaultRemoteTreeTableModel(CacheableTreeTableModel model)
Constructs a DefaultRemoteTreeTableModel. |
|
| Method Summary | |
|---|---|
void |
addRemoteTableListener(RemoteTableListener l)
Adds a RemoteTableListener that is notified each time the RemoteTableModel will start or stop querying the underlying treetable model. |
void |
fireRemoteAction(int type)
Notifies listeners of this RemoteTreeTableModel's status. |
int |
getChildCount(Object parent)
Returns the number of children of parent.
Returns 0 if the node
is a leaf or if it has no children. parent must be a node
previously obtained from this data source. |
Class |
getColumnClass(int column)
Returns the class of all the cells in the column. |
int |
getColumnCount()
Returns the number of columns. |
String |
getColumnName(int column)
Returns the name of the column at columnIndex as it will be displayed by the table |
Object |
getPendingValue(Object node,
int column)
Returns the object to display if a cell value is pending. |
Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for node,
at column index column. |
boolean |
isCellEditable(Object node,
int column)
Returns true if node at columnIndex is editable. |
void |
removeRemoteTableListener(RemoteTableListener l)
Removes a RemoteTableListener from the list that is notified each time the RemoteTableModel will start or stop querying the underlying treetable model. |
void |
setTreeModel(TreeModel newModel)
Sets the underlying tree model to newModel |
void |
setValueAt(Object aValue,
Object node,
int column)
Sets the value for node at columnIndex to aValue. |
void |
stop()
Stops the thread that asynchronously queries the underlying cacheable treetable model. |
| Methods inherited from class com.sciapp.treetable.TreeModelMap |
|---|
getChild, getIndexOfChild, getPathToRoot, getPathToRoot, getRoot, getTreeModel, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, valueForPathChanged |
| Methods inherited from class com.sciapp.treetable.AbstractTreeTableModel |
|---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, fireTreeTableStructureChanged, isAggregate, isFooter, isHeader, removeTreeModelListener, setRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sciapp.treetable.TreeTableModel |
|---|
isAggregate, isFooter, isHeader |
| Methods inherited from interface javax.swing.tree.TreeModel |
|---|
addTreeModelListener, getChild, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged |
| Field Detail |
|---|
protected CacheableTreeTableModel cacheTreeModel
protected Object pendingValue
| Constructor Detail |
|---|
public DefaultRemoteTreeTableModel(CacheableTreeTableModel model)
| Method Detail |
|---|
public void addRemoteTableListener(RemoteTableListener l)
addRemoteTableListener in interface RemoteTreeTableModell - the RemoteTableListener to addpublic void fireRemoteAction(int type)
type - the type of the event - either STARTED or STOPPED.public int getChildCount(Object parent)
parent.
Returns 0 if the node
is a leaf or if it has no children. parent must be a node
previously obtained from this data source.
getChildCount in interface TreeModelgetChildCount in class TreeModelMapparent - a node in the tree, obtained from this data source
parentpublic Class getColumnClass(int column)
getColumnClass in interface TreeTableModelcolumn - the index of the column
public int getColumnCount()
getColumnCount in interface TreeTableModelpublic String getColumnName(int column)
getColumnName in interface TreeTableModelcolumn - the index of the column
public Object getPendingValue(Object node,
int column)
getPendingValue in interface RemoteTreeTableModelnode - the node to considercolumn - the node's column index
public Object getValueAt(Object node,
int column)
node,
at column index column.
getValueAt in interface TreeTableModelnode - the node to querycolumn - the column index
public boolean isCellEditable(Object node,
int column)
node at columnIndex is editable.
isCellEditable in interface TreeTableModelnode - the node to considercolumn - the column index
public void removeRemoteTableListener(RemoteTableListener l)
removeRemoteTableListener in interface RemoteTreeTableModell - the RemoteTableListener to removepublic void setTreeModel(TreeModel newModel)
newModel
setTreeModel in class TreeModelMapnewModel - the new tree model to assign.
public void setValueAt(Object aValue,
Object node,
int column)
node at columnIndex to aValue.
setValueAt in interface TreeTableModelaValue - the new valuenode - the node whose value is to be changedcolumn - the column whose value is to be changedpublic 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 | ||||||||