|
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.treetable.TreeTableModelMap
public class TreeTableModelMap
TreeTableModelMap wraps around a TreeTableModel.
| Field Summary | |
|---|---|
protected TreeTableModel |
treeTableModel
the underlying treetable model. |
| 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 | |
|---|---|
TreeTableModelMap(TreeTableModel treeTableModel)
Constructs a TreeTableModelMap. |
|
| Method Summary | |
|---|---|
void |
addReorderListener(ReorderListener l)
Adds a ReorderListener that is notified each time a change to the data model occurs so that the table updates the selected rows accordingly. |
void |
fireRowsMapped(int[] changedIndices)
Notifies listeners that the rows of the table have been reordered according to the changedIndices map. |
void |
fireRowsReordered(ReorderEvent event)
Notifies listeners that the rows of the table have been reordered in some way. |
Class |
getColumnClass(int columnIndex)
Returns the class of all the cells in the column. |
int |
getColumnCount()
Returns the number of columns. |
String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex as it will be displayed by the table |
TreeTableModel |
getInnerTreeTableModel()
In a chain of TreeTableModelMaps, this method returns the inner most treetable model that is not an instanceof TreeTableModelMap. |
int[] |
getMappedIndexes(Object node)
Returns an array representing how the nodes' children have been transformed. |
TreeTableModel |
getTreeTableModel()
Returns the underlying tree table model. |
List |
getUncachedChildren(Object parent,
int from,
int to)
Retrieves the leaf rows from the treetable model by specifying a row interval. |
int |
getUncachedGroupCount(Object node)
Retrieves the children count for node. |
List |
getUncachedGroups(Object parent,
int from,
int to)
Retrieves the branch rows from the treetable model by specifying a row interval. |
Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for node,
at column index column. |
boolean |
isAggregate(Object row)
Determines if node is an aggregate row. |
boolean |
isCellEditable(Object node,
int columnIndex)
Returns true if node at columnIndex is editable. |
boolean |
isCountCached(Object node)
Determines whether the children count for node has been evaluated. |
boolean |
isFooter(Object row)
Determines if node is a footer. |
boolean |
isHeader(Object row)
Determines if node is a header. |
boolean |
isRangedModel()
Determines whether the cache model can fetch data in ranges. |
boolean |
isValueCached(Object node,
int column)
Determines whether the value for node at index column has been evaluated. |
void |
removeReorderListener(ReorderListener l)
Removes a listener from the list that is notified each time a reorder event is generated. |
void |
rowsReordered(ReorderEvent e)
Called whenever the rows of a JTable have been restructured. |
void |
setTreeModel(TreeModel newModel)
Sets the underlying tree model to newModel |
void |
setTreeTableModel(TreeTableModel treeTableModel)
Sets the underlying tree table model to treeTableModel. |
void |
setValueAt(Object aValue,
Object node,
int columnIndex)
Sets the value for node at columnIndex to aValue. |
| Methods inherited from class com.sciapp.treetable.TreeModelMap |
|---|
getChild, getChildCount, 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, removeTreeModelListener, setRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.tree.TreeModel |
|---|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged |
| Field Detail |
|---|
protected TreeTableModel treeTableModel
| Constructor Detail |
|---|
public TreeTableModelMap(TreeTableModel treeTableModel)
| Method Detail |
|---|
public void addReorderListener(ReorderListener l)
addReorderListener in interface ReorderModell - the ReorderListenerpublic void fireRowsMapped(int[] changedIndices)
fireRowsMapped in interface ReorderModelchangedIndices - int array indicating how the rows have been reordered.ReorderEventpublic void fireRowsReordered(ReorderEvent event)
fireRowsReordered in interface ReorderModelevent - the reorder event.ReorderEventpublic Class getColumnClass(int columnIndex)
getColumnClass in interface TreeTableModelcolumnIndex - the index of the column
public int getColumnCount()
getColumnCount in interface TreeTableModelpublic String getColumnName(int columnIndex)
getColumnName in interface TreeTableModelcolumnIndex - the index of the column
public int[] getMappedIndexes(Object node)
node - the tree node
public TreeTableModel getTreeTableModel()
public List getUncachedChildren(Object parent,
int from,
int to)
getUncachedChildren in interface CacheableTreeTableModelparent - the parent nodefrom - the starting rowto - the ending row
public int getUncachedGroupCount(Object node)
getUncachedGroupCount in interface CacheableTreeTableModelnode - the node for which the children count we want to retrieve.
public List getUncachedGroups(Object parent,
int from,
int to)
getUncachedGroups in interface CacheableTreeTableModelparent - the parent nodefrom - the starting rowto - the ending row
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 isAggregate(Object row)
node is an aggregate row.
isAggregate in interface TreeTableModelisAggregate in class AbstractTreeTableModelrow - the node to consider
node is an aggregate row, false otherwise
public boolean isCellEditable(Object node,
int columnIndex)
node at columnIndex is editable.
isCellEditable in interface TreeTableModelnode - the node to considercolumnIndex - the column index
public boolean isCountCached(Object node)
isCountCached in interface CacheableTreeTableModelpublic boolean isFooter(Object row)
node is a footer.
isFooter in interface TreeTableModelisFooter in class AbstractTreeTableModelrow - the row to consider
node is a footer, false otherwisepublic boolean isHeader(Object row)
node is a header.
isHeader in interface TreeTableModelisHeader in class AbstractTreeTableModelrow - the row to query
node is a header, false otherwisepublic boolean isRangedModel()
isRangedModel in interface CacheableTreeTableModel
public boolean isValueCached(Object node,
int column)
isValueCached in interface CacheableTreeTableModelnode - the node to considercolumn - the cell's column index
public void removeReorderListener(ReorderListener l)
removeReorderListener in interface ReorderModell - the RearrangeListenerpublic void rowsReordered(ReorderEvent e)
rowsReordered in interface ReorderListenere - the ReorderEvent objectpublic void setTreeModel(TreeModel newModel)
newModel
setTreeModel in class TreeModelMapnewModel - the new tree model to assign.public void setTreeTableModel(TreeTableModel treeTableModel)
treeTableModel.
This method will invoke setTreeModel.
treeTableModel - the new tree table model to assign.
public void setValueAt(Object aValue,
Object node,
int columnIndex)
node at columnIndex to aValue.
setValueAt in interface TreeTableModelaValue - the new valuenode - the node whose value is to be changedcolumnIndex - the column whose value is to be changedpublic TreeTableModel getInnerTreeTableModel()
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||