|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.citra.treetable.TreeTableRow
public abstract class TreeTableRow
A TreeTableRow represents a node in the tree data structure of a TreeTableModel. TreeTableRows are classified into data rows and aggregate rows.
Datarows are nodes that cannot have children and that are linked to the actual
tabular data. This can be done via the modelIndex
attribute or the
userObject that is inherited by its DefaultMutableTreeNode superclass.
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 usually used to 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
.
Field Summary | |
---|---|
protected Object[] |
aggregateValues
The object array which is used to store aggregate information. |
protected int |
modelIndex
an integer that can be used for various purposes. |
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 model index. |
Method Summary | |
---|---|
void |
clear()
Clear the aggregate values that are stored. |
Object |
getAggregateValue(int columnIndex)
Returns the aggregate value at columnIndex . |
Object[] |
getAggregateValues()
Returns the aggregate values. |
int |
getModelIndex()
Returns the model index attribute which can be used for various purposes in this library. |
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. |
void |
setAggregateValue(Object value,
int columnIndex)
Sets the aggregate value at columnIndex . |
void |
setAggregateValues(Object[] values)
Assigns the aggregates values. |
void |
setModelIndex(int modelIndex)
Assigns a new model index attribute. |
String |
toString()
Returns the result of sending toString() to this node's
user object, or null if this node has no user object. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int modelIndex
protected Object[] aggregateValues
Constructor Detail |
---|
public TreeTableRow(Object o, int modelIndex)
o
as the userObject and modelIndex
as the model index.
Method Detail |
---|
public void clear()
public Object getAggregateValue(int columnIndex)
columnIndex
.
This method will return null by default.
columnIndex
- the index of the column
columnIndex
public int getModelIndex()
public abstract boolean isAggregate()
public abstract boolean isFooter()
public abstract boolean isHeader()
public void setAggregateValue(Object value, int columnIndex)
columnIndex
.
value
- the aggregate value to setcolumnIndex
- the index of the columnpublic void setAggregateValues(Object[] values)
values
- the aggregate values to setpublic Object[] getAggregateValues()
public String toString()
toString()
to this node's
user object, or null if this node has no user object.
toString
in class DefaultMutableTreeNode
DefaultMutableTreeNode.getUserObject()
public void setModelIndex(int modelIndex)
modelIndex
- the new index
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |