com.sciapp.table.group
Class TreeTableColumnModelMap
java.lang.Object
com.sciapp.treetable.AbstractTreeTableModel
com.sciapp.treetable.TreeModelMap
com.sciapp.treetable.TreeTableModelMap
com.sciapp.table.group.TreeTableColumnModelMap
- All Implemented Interfaces:
- ReorderListener, CacheableTreeTableModel, TreeTableColumnModel, ReorderModel, TreeTableModel, Serializable, EventListener, TreeModelListener, TreeModel
public class TreeTableColumnModelMap
- extends TreeTableModelMap
- implements TreeTableColumnModel
TreeTableColumnModelMap is used for transparently transforming an underlying TreeTableColumnModel.
You can use this class in combination with a DefaultFilterTreeTableModel and DefaultSortTreeTableModel.
For example:
DefaultFilterTreeTableModel ftm = new DefaultFilterTreeTableModel(treeColumnModel);
DefaultSortTreeTableModel stm = new DefaultSortTreeTableModel(ftm);
TreeTableColumnModelMap model = new TreeTableColumnModelMap(stm);
TreeTableHeader treeHeader = new TreeTableHeader(model);
In the example above, we have created a filterable and sortable treetable header.
- See Also:
- Serialized Form
| Methods inherited from class com.sciapp.treetable.TreeTableModelMap |
addReorderListener, fireRowsMapped, fireRowsReordered, getColumnClass, getColumnCount, getColumnName, getInnerTreeTableModel, getMappedIndexes, getTreeTableModel, getUncachedChildren, getUncachedGroupCount, getUncachedGroups, getValueAt, isAggregate, isCellEditable, isCountCached, isFooter, isHeader, isRangedModel, isValueCached, removeReorderListener, rowsReordered, setTreeModel, setTreeTableModel, setValueAt |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeTableColumnModelMap
public TreeTableColumnModelMap(TreeTableModel treeTableModel)
- Constructs a ColumnModelMapper.
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
getColumn
public TableColumn getColumn(Object node)
- Returns the table column at the specified node.
- Specified by:
getColumn in interface TreeTableColumnModel
- Returns:
- the table column
getColumnFromModel
protected TableColumn getColumnFromModel(MutableTreeTableModel model,
Object node)
- Returns the column from the mutable treetable model's node passed as argument.
- Parameters:
model - the mutable treetable modelnode - the model's node
- Returns:
- the table column at
node
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 insertcolumnNode - 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 insertedindex - 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