Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.tree
Class TreeTableRow

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.citra.tree.TreeTableRow
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
AggregateRow, DataRow

public abstract class TreeTableRow
extends DefaultMutableTreeNode

A TreeTableRow represents a node in the tree data structure of a TreeTableModel. TreeTableRows are classified in data rows and aggregate rows.

Data rows are associated with an object row of the ListTableModel that holds the actual tabular data. This is done with the help of an index that points to the respective object in the data list of ListTableModel. The userObject of its superclass, DefaultMutableTreeNode, is also a reference to that object.

Aggregate rows can either correspond to the group rows of the TreeTable (header rows, that can be expanded), or to rows that are placed at the bottom of each tree hierarchy, so called footer rows. An aggregate row is not associated with the data of the ListTableModel, but can provide information about the rows that are below it or above it (header or footer row respectively). This is done with the help of an Aggregator.

See Also:
Serialized Form

Field Summary
protected  int modelIndex
          an integer that refers to the index of the object that this TreeTableRow is associated with.
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
TreeTableRow(Object o, int modelIndex)
          Constructs a TreeTableRow object having o as the userObject and modelIndex as the index of the object this TreeTableRow is associated with.
 
Method Summary
 int getModelIndex()
          Returns the index of the object in the data list of a ListTableModel that this TreeTableRow is associated with.
abstract  boolean isAggregate()
          Returns true if this node represents an aggregate row in the tree data structure created by TreeTableModel.
abstract  boolean isFooter()
          Returns true if this node represents a footer row in the tree data structure created by TreeTableModel.
abstract  boolean isHeader()
          Returns true if this node represents a header row in the tree data structure created by TreeTableModel.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, 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, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modelIndex

protected int modelIndex
an integer that refers to the index of the object that this TreeTableRow is associated with.

Constructor Detail

TreeTableRow

public TreeTableRow(Object o,
                    int modelIndex)
Constructs a TreeTableRow object having o as the userObject and modelIndex as the index of the object this TreeTableRow is associated with.

Method Detail

getModelIndex

public int getModelIndex()
Returns the index of the object in the data list of a ListTableModel that this TreeTableRow is associated with.

Returns:
an index

isAggregate

public abstract boolean isAggregate()
Returns true if this node represents an aggregate row in the tree data structure created by TreeTableModel.

Returns:
true if this node is an aggregate row, false otherwise.

isFooter

public abstract boolean isFooter()
Returns true if this node represents a footer row in the tree data structure created by TreeTableModel.

Returns:
true if this node is a footer row, false otherwise.

isHeader

public abstract boolean isHeader()
Returns true if this node represents a header row in the tree data structure created by TreeTableModel.

Returns:
true if this node is a header row, false otherwise.

Copyright © 2011 Citra Technologies. All Rights Reserved.