Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.treetable
Interface Aggregator

All Known Subinterfaces:
DatabaseAggregator
All Known Implementing Classes:
AbstractAggregator, AbstractDatabaseAggregator, DefaultCellAggregator, DefaultDatabaseAggregator, TreeNodeAggregator

public interface Aggregator

Aggregator calculates and returns values for the aggregate rows of a TreeTable component.


Method Summary
 Object getAggregateValue(AggregateRow node, int columnIndex)
          Calculates and returns the aggregate value for node at columnIndex.
 Object prepareValue(AggregateRow node, int columnIndex)
          This method retrieves the aggregate value that was set for the row at rowIndex and columnIndex.
 

Method Detail

getAggregateValue

Object getAggregateValue(AggregateRow node,
                         int columnIndex)
Calculates and returns the aggregate value for node at columnIndex.

Parameters:
node - the node
columnIndex - the index of the column
Returns:
the aggregate value

prepareValue

Object prepareValue(AggregateRow node,
                    int columnIndex)
This method retrieves the aggregate value that was set for the row at rowIndex and columnIndex. If this value is null, getAggregateValue(com.sciapp.treetable.AggregateRow, int) is called in order to evaluate it, and the value returned is assigned as the aggregate value of the row via the TreeTableRow.setAggregateValue(java.lang.Object, int) method. In this way, aggregate values are evaluated only once, in order to avoid manifold operations.

Parameters:
node - the node
columnIndex - the index of the column
Returns:
the aggregate value of node

Copyright © 2005 Scientific Applications. All Rights Reserved.