Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.group
Class TreeTableColumnModelMask

java.lang.Object
  extended by com.sciapp.treetable.AbstractTreeTableModel
      extended by com.sciapp.treetable.MutableTreeTableModel
          extended by com.sciapp.treetable.ComparableTreeTableModel
              extended by com.sciapp.treetable.DefaultMutableTreeTableModel
                  extended by com.sciapp.treetable.TreeTableModelMask
                      extended by com.sciapp.table.group.TreeTableColumnModelMask
All Implemented Interfaces:
ReorderListener, TreeTableColumnModel, ReorderModel, TreeTableModel, Serializable, EventListener, TreeModelListener, TreeModel

public class TreeTableColumnModelMask
extends TreeTableModelMask
implements TreeTableColumnModel

TreeTableColumnModelMask is a treetable column model used to create and return TableColumns from any treetable model implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sciapp.treetable.TreeTableModelMask
model
 
Fields inherited from class com.sciapp.treetable.DefaultMutableTreeTableModel
editable
 
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
TreeTableColumnModelMask(TreeTableModel model)
          Constructs a TreeTableColumnModelMask.
 
Method Summary
protected  MutableTreeNode createMutableColumnNode(TableColumn aColumn)
          Creates and returns a tree-node containing the table column passed as argument.
 void fireTreeTableStructureChanged(boolean adapterStructureChange)
          Generates an event that notifies listeners that the whole treetable structure has changed: both row and column data.
 TableColumn getColumn(Object node)
          Returns the table column at the specified node.
 Object insertColumnInto(TableColumn aColumn, Object columnNode, Object parentNode, int index)
          Inserts a table column at the specified node's index.
 void removeColumnFrom(Object node)
          Removes a node from the model.
 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.

 
Methods inherited from class com.sciapp.treetable.TreeTableModelMask
createMaskedNode, getChildCount, getColumnClass, getColumnCount, getColumnName, getMaskedNode, getTreeTableModel, getValueAt, insertNodeInto, isLeaf, rowsReordered, setMaskedNode, setTreeTableModel, treeNodesChanged, treeNodesRemoved, treeStructureChanged
 
Methods inherited from class com.sciapp.treetable.DefaultMutableTreeTableModel
createLeafNode, createNonLeafNode, getEditable, isCellEditable, replicateLeafNode, setEditable, setValueAt
 
Methods inherited from class com.sciapp.treetable.ComparableTreeTableModel
add, add, addNode, addRowComparator, clearComparators, comparatorsChanged, createDefaultComparators, findTreeNode, getAddChildForGroup, getDefaultComparator, getRowComparator, getRowComparators, getRowComparatorSize, insertRowComparator, loadComparators, refreshComparators, removeRowComparator, removeRowComparator, saveComparators, setAddChildForGroup, setDefaultComparator, setRowComparator
 
Methods inherited from class com.sciapp.treetable.MutableTreeTableModel
addColumn, addColumn, addReorderListener, clear, fireRowsMapped, fireRowsReordered, getChild, getIndexOfChild, getPathToRoot, getPathToRoot, moveNode, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeNodeFromParent, removeReorderListener, setColumnClasses, setColumnNames, valueForPathChanged
 
Methods inherited from class com.sciapp.treetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, 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, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Constructor Detail

TreeTableColumnModelMask

public TreeTableColumnModelMask(TreeTableModel model)
Constructs a TreeTableColumnModelMask.

Method Detail

createMutableColumnNode

protected MutableTreeNode createMutableColumnNode(TableColumn aColumn)
Creates and returns a tree-node containing the table column passed as argument.

Parameters:
aColumn - the column for which a tree-node is being added
Returns:
a tree-node containing the supplied column

fireTreeTableStructureChanged

public void fireTreeTableStructureChanged(boolean adapterStructureChange)
Generates an event that notifies listeners that the whole treetable structure has changed: both row and column data. The adapterStructureChange argument is significant only if the model is contained within a TreeTableModelAdapter. In this case, using adapterStructureChange with a true value will make TreeTableModelAdapter fire a table structure event.

Overrides:
fireTreeTableStructureChanged in class AbstractTreeTableModel
Parameters:
adapterStructureChange - true if this event will triger a structure change TableModelEvent, false otherwise

getColumn

public TableColumn getColumn(Object node)
Returns the table column at the specified node.

Specified by:
getColumn in interface TreeTableColumnModel
Returns:
the table column

insertColumnInto

public Object insertColumnInto(TableColumn aColumn,
                               Object columnNode,
                               Object parentNode,
                               int index)
Inserts a table column at the specified node's index.

Specified by:
insertColumnInto in interface TreeTableColumnModel
Parameters:
aColumn - the table column to insert
columnNode - the node that 'contains' the column. If this is null, a new node should be created.
parentNode - the node under which the column is to be inserted
index - the parent node's index to insert the column into
Returns:
the newly created node or columnNode if this wasn't null

removeColumnFrom

public void removeColumnFrom(Object node)
Removes a node from the model. The node presumably 'contains' a table column.

Specified by:
removeColumnFrom in interface TreeTableColumnModel
Parameters:
node - the node at which the column is found

treeNodesInserted

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.

Specified by:
treeNodesInserted in interface TreeModelListener
Overrides:
treeNodesInserted in class TreeTableModelMask

Copyright © 2005 Scientific Applications. All Rights Reserved.