Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.treetable.db
Class DatabaseHeaderRow

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.sciapp.treetable.TreeTableRow
          extended by com.sciapp.treetable.AggregateRow
              extended by com.sciapp.treetable.HeaderRow
                  extended by com.sciapp.treetable.db.DatabaseHeaderRow
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class DatabaseHeaderRow
extends HeaderRow

DatabaseHeaderRow is a specialized HeaderRow that allows setting its children count and assign children at a random index.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sciapp.treetable.TreeTableRow
aggregateValues, modelIndex
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
DatabaseHeaderRow(Object o, int modelIndex)
          Constructs a DatabaseHeaderRow.
 
Method Summary
 TreeNode getChildAt(int index)
          Returns the child at the specified index in this node's child array.
 int getChildCount()
          Returns the number of children of this node.
 void removeAllChildren()
          Removes all of this node's children, setting their parents to null.
 void setChildAt(TreeTableRow newChild, int index)
          Assignes newChild as the child at index.
 void setChildCount(int childCount)
          Assigns childCount as this node's children count.
 
Methods inherited from class com.sciapp.treetable.HeaderRow
isCountEvaluated, isFooter, isHeader, remove, setCountEvaluated
 
Methods inherited from class com.sciapp.treetable.AggregateRow
isAggregate
 
Methods inherited from class com.sciapp.treetable.TreeTableRow
clear, getAggregateValue, getAggregateValues, getModelIndex, setAggregateValue, setAggregateValues, setModelIndex, toString
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseHeaderRow

public DatabaseHeaderRow(Object o,
                         int modelIndex)
Constructs a DatabaseHeaderRow.

Method Detail

getChildAt

public TreeNode getChildAt(int index)
Returns the child at the specified index in this node's child array.

Specified by:
getChildAt in interface TreeNode
Overrides:
getChildAt in class DefaultMutableTreeNode
Parameters:
index - an index into this node's child array
Returns:
the TreeNode in this node's child array at the specified index

getChildCount

public int getChildCount()
Returns the number of children of this node.

Specified by:
getChildCount in interface TreeNode
Overrides:
getChildCount in class DefaultMutableTreeNode
Returns:
an int giving the number of children of this node

removeAllChildren

public void removeAllChildren()
Removes all of this node's children, setting their parents to null. If this node has no children, this method does nothing.

Overrides:
removeAllChildren in class DefaultMutableTreeNode

setChildAt

public void setChildAt(TreeTableRow newChild,
                       int index)
Assignes newChild as the child at index.

Parameters:
newChild - the child to assign
index - the index at which the new child is to be assigned

setChildCount

public void setChildCount(int childCount)
Assigns childCount as this node's children count.

Parameters:
childCount - the child count to assign

Copyright © 2005 Scientific Applications. All Rights Reserved.