org.zkoss.pivot
Interface PivotModel

All Known Subinterfaces:
PivotModelExt
All Known Implementing Classes:
AbstractPivotModel, TabularPivotModel

public interface PivotModel

The data model for Pivottable.

Author:
simonpai

Method Summary
 void addPivotDataListener(PivotDataListener p)
          Adds a pivot data listener.
 PivotHeaderTree getColumnHeaderTree()
          Return the header tree of columns.
 PivotField[] getFields()
          Return a list of all fields in the model.
 PivotField[] getFields(PivotField.Type type)
          Return a list of pivot fields of the given type.
 PivotHeaderTree getRowHeaderTree()
          Return the header tree of rows.
 java.lang.Object getValue(PivotHeaderNode rowNode, int rowCalIndex, PivotHeaderNode colNode, int colCalIndex, int dataIndex)
          Get the calculated data summary at specific cell position.
 void removePivotDataListener(PivotDataListener p)
          Removes a pivot data listener.
 

Method Detail

getFields

PivotField[] getFields(PivotField.Type type)
Return a list of pivot fields of the given type.

See Also:
PivotField, PivotField.Type

getFields

PivotField[] getFields()
Return a list of all fields in the model.


getRowHeaderTree

PivotHeaderTree getRowHeaderTree()
Return the header tree of rows.

See Also:
PivotHeaderTree

getColumnHeaderTree

PivotHeaderTree getColumnHeaderTree()
Return the header tree of columns.

See Also:
PivotHeaderTree

getValue

java.lang.Object getValue(PivotHeaderNode rowNode,
                          int rowCalIndex,
                          PivotHeaderNode colNode,
                          int colCalIndex,
                          int dataIndex)
Get the calculated data summary at specific cell position.

Parameters:
rowNode - row node, root node means grand total
rowCalIndex - row subtotal calculator index, -1 if not subtotal
colNode - column node, root node means grand total
colCalIndex - column subtotal calculator index, -1 if not subtotal
dataIndex - index of data fields

addPivotDataListener

void addPivotDataListener(PivotDataListener p)
Adds a pivot data listener.

See Also:
PivotDataListener

removePivotDataListener

void removePivotDataListener(PivotDataListener p)
Removes a pivot data listener.

See Also:
PivotDataListener


Copyright © 2013. All Rights Reserved.