|
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.MutableTreeTableModel
com.sciapp.treetable.ComparableTreeTableModel
com.sciapp.treetable.ObjectTreeTableModel
com.sciapp.table.group.DefaultTreeTableColumnModel
com.sciapp.table.group.TreeColumnModelMask
public class TreeColumnModelMask
TreeColumnModelMask wraps around a TreeTableColumnModel.
Field Summary | |
---|---|
protected TreeTableColumnModel |
model
the underlying treetable column model |
Fields inherited from class com.sciapp.treetable.ComparableTreeTableModel |
---|
addChildForGroup, comparators, defaultComparatorsByColumnClass |
Fields inherited from class com.sciapp.treetable.MutableTreeTableModel |
---|
classes, columns |
Fields inherited from class com.sciapp.treetable.AbstractTreeTableModel |
---|
listenerList, root |
Fields inherited from interface com.sciapp.treetable.TreeTableModel |
---|
CHANGE_COLUMN_SOURCE |
Constructor Summary | |
---|---|
TreeColumnModelMask(TreeTableColumnModel model)
Constructs a TreeColumnModelMask. |
Method Summary | |
---|---|
protected DefaultMutableTreeNode |
createLeafNode(Object o)
Creates and returns a new instance of a leaf node whose 'column data' is identified by data .
data in this framework is either DefaultMutableTreeNode's user object attribute
or the aggregate values of a TreeTableRow. |
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. |
TableColumn |
getColumn(Object node)
Returns the table column at the specified node. |
Object |
getMaskedNode(Object node)
Returns the enclosed node of the underlying model, that node represents. |
TreeTableColumnModel |
getTreeTableColumnModel()
Returns the underlying treetable column model. |
void |
insertNodeInto(MutableTreeNode newChild,
MutableTreeNode parent,
int index)
Inserts a node at a specific location index in its parents children. |
boolean |
isLeaf(Object node)
Returns true if node is a leaf.
It is possible for this method to return false
even if node has no children.
A directory in a filesystem, for example,
may contain no files; the node representing
the directory is not a leaf, but it also has no children. |
void |
rowsReordered(ReorderEvent e)
Called whenever the rows of a JTable have been restructured. |
void |
setTreeTableColumnModel(TreeTableColumnModel model)
Assigns a new underlying treetable column model |
void |
treeNodesChanged(TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. |
void |
treeNodesInserted(TreeModelEvent e)
Invoked after nodes have been inserted into the tree. |
void |
treeNodesRemoved(TreeModelEvent e)
Invoked after nodes have been removed from the tree. |
void |
treeStructureChanged(TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. |
Methods inherited from class com.sciapp.table.group.DefaultTreeTableColumnModel |
---|
addColumnInvalidatorListener, fireColumnsInvalidated, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, getColumnClass, getObjectAt, insertColumnInto, removeColumnFrom, removeColumnInvalidatorListener |
Methods inherited from class com.sciapp.treetable.ObjectTreeTableModel |
---|
createNonLeafNode, getValueAt, replicateLeafNode, setObjectAt, setValueAt |
Methods inherited from class com.sciapp.treetable.MutableTreeTableModel |
---|
addColumn, addColumn, addReorderListener, clear, fireRowsMapped, fireRowsReordered, getChild, getColumnCount, getColumnName, getIndexOfChild, getPathToRoot, getPathToRoot, isCellEditable, moveNode, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeNodeFromParent, removeReorderListener, setColumnClasses, setColumnNames, valueForPathChanged |
Methods inherited from class com.sciapp.treetable.AbstractTreeTableModel |
---|
addTreeModelListener, fireTreeNodesChanged, fireTreeTableStructureChanged, getRoot, 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 javax.swing.tree.TreeModel |
---|
addTreeModelListener, getChild, getIndexOfChild, getRoot, removeTreeModelListener, valueForPathChanged |
Field Detail |
---|
protected TreeTableColumnModel model
Constructor Detail |
---|
public TreeColumnModelMask(TreeTableColumnModel model)
Method Detail |
---|
protected DefaultMutableTreeNode createLeafNode(Object o)
data
.
data
in this framework is either DefaultMutableTreeNode's user object attribute
or the aggregate values of a TreeTableRow.
createLeafNode
in class ObjectTreeTableModel
o
- the node's 'column data'.
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 TreeModel
getChildCount
in class MutableTreeTableModel
parent
- a node in the tree, obtained from this data source
parent
public TableColumn getColumn(Object node)
getColumn
in interface TreeTableColumnModel
getColumn
in class DefaultTreeTableColumnModel
public Object getMaskedNode(Object node)
node
- a node of this model
public TreeTableColumnModel getTreeTableColumnModel()
public void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
insertNodeInto
in class MutableTreeTableModel
newChild
- the node to insertparent
- the parent node to remove node
fromindex
- the location in the parent node's childrenspublic boolean isLeaf(Object node)
true
if node
is a leaf.
It is possible for this method to return false
even if node
has no children.
A directory in a filesystem, for example,
may contain no files; the node representing
the directory is not a leaf, but it also has no children.
isLeaf
in interface TreeModel
isLeaf
in class MutableTreeTableModel
node
- a node in the tree, obtained from this data source
node
is a leafpublic void rowsReordered(ReorderEvent e)
rowsReordered
in interface ReorderListener
e
- the ReorderEvent objectpublic void setTreeTableColumnModel(TreeTableColumnModel model)
model
- the new treetable column model to assignpublic void treeNodesChanged(TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.
To indicate the root has changed, childIndices and children will be null.
Use e.getPath()
to get the parent of the changed node(s).
e.getChildIndices()
returns the index(es) of the changed node(s).
treeNodesChanged
in interface TreeModelListener
public void treeNodesInserted(TreeModelEvent e)
Invoked after nodes have been inserted into the tree.
Use e.getPath()
to get the parent of the new node(s).
e.getChildIndices()
returns the index(es) of the new node(s)
in ascending order.
treeNodesInserted
in interface TreeModelListener
public void treeNodesRemoved(TreeModelEvent e)
Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.
Use e.getPath()
to get the former parent of the deleted node(s).
e.getChildIndices()
returns, in ascending order, the index(es)
the node(s) had before being deleted.
treeNodesRemoved
in interface TreeModelListener
public void treeStructureChanged(TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.
Use e.getPath()
to get the path to the node.
e.getChildIndices()
returns null.
treeStructureChanged
in interface TreeModelListener
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |