com.sciapp.treetable
Class NodeTreeTableModelMap
java.lang.Object
com.sciapp.treetable.AbstractTreeTableModel
com.sciapp.treetable.TreeModelMap
com.sciapp.treetable.TreeTableModelMap
com.sciapp.treetable.NodeTreeTableModelMap
- All Implemented Interfaces:
- ReorderListener, CacheableTreeTableModel, ReorderModel, TreeTableModel, Serializable, EventListener, TreeModelListener, TreeModel
public class NodeTreeTableModelMap
- extends TreeTableModelMap
NodeTreeTableModelMap will show only a single branch of a TreeTableModel.
Whether the node's children will be visible, depends on
the showChildren property.
The tree node to show can be specified in the constructor, but can
be later specified by calling AbstractTreeTableModel.setRoot(java.lang.Object).
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
showChildren
determines whether to show the node's children |
|
Method Summary |
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. |
Object |
getRoot()
Returns the root of the tree. Returns null
only if the tree has no nodes. |
boolean |
getShowChildren()
Determines whether to show the node's children. |
void |
setShowChildren(boolean showChildren)
Determines whether to show the node's children. |
| 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, getIndexOfChild, getPathToRoot, getPathToRoot, 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 |
showChildren
protected boolean showChildren
- determines whether to show the node's children
NodeTreeTableModelMap
public NodeTreeTableModelMap(TreeTableModel treeTableModel,
Object root)
- Constructs a NodeTreeTableModelMap.
getChildCount
public 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.
- Specified by:
getChildCount in interface TreeModel- Overrides:
getChildCount in class TreeModelMap
- Parameters:
parent - a node in the tree, obtained from this data source
- Returns:
- the number of children of the node
parent
getRoot
public Object getRoot()
- Returns the root of the tree. Returns
null
only if the tree has no nodes.
- Specified by:
getRoot in interface TreeModel- Overrides:
getRoot in class TreeModelMap
- Returns:
- the root of the tree
getShowChildren
public boolean getShowChildren()
- Determines whether to show the node's children.
- Returns:
- true if the children will be shown, false otherwise
setShowChildren
public void setShowChildren(boolean showChildren)
- Determines whether to show the node's children.
- Parameters:
showChildren - true if the children will be shown, false otherwise