Package org.zkoss.pivot
Interface PivotRenderer
- All Known Subinterfaces:
PivotRendererExt
- All Known Implementing Classes:
SimplePivotRenderer
public interface PivotRenderer
PivotRenderer defines some methods for
Pivottable to render the
content to the browser.
Note: The content can support HTML formatting.
- Author:
- jumperchen
-
Method Summary
Modifier and TypeMethodDescriptionintgetColumnSize(Pivottable table, PivotHeaderContext columnContext, PivotField field) Returns the column size in pixel.intgetRowSize(Pivottable table, PivotHeaderContext rowContext, PivotField field) Returns the row size in pixel.renderCell(Number data, Pivottable table, PivotHeaderContext rowContext, PivotHeaderContext columnContext, PivotField dataField) Renders the content of each cell.renderDataField(PivotField field) Renders the label of a data field, shown when there are multiple data fields.renderField(Object data, Pivottable table, PivotField field) Renders the label of a header field in columns and rows.renderGrandTotalField(Pivottable table, PivotField field) Renders the title of a grand total field.renderSubtotalField(Object data, Pivottable table, PivotField field, Calculator calculator) Renders the label of a subtotal field.
-
Method Details
-
renderCell
String renderCell(Number data, Pivottable table, PivotHeaderContext rowContext, PivotHeaderContext columnContext, PivotField dataField) Renders the content of each cell. (excluding row fields, column fields)- Parameters:
data- data objectrowContext- row header context objectcolumnContext- column header context object- See Also:
-
renderField
Renders the label of a header field in columns and rows.- Parameters:
data- data objectfield- PivotField- See Also:
-
renderDataField
Renders the label of a data field, shown when there are multiple data fields. -
renderSubtotalField
Renders the label of a subtotal field.- Parameters:
data- data objectfield- PivotFieldcalculator- the subtotal calculator- See Also:
-
renderGrandTotalField
Renders the title of a grand total field.- Parameters:
field- a data PivotField
-
getColumnSize
Returns the column size in pixel.Note that the cell field always from 0 to m, and the returned value is never negative.
- Parameters:
table- the PivottablecolumnContext- information of the corresponding columnfield- the field corresponds to the leaf column cell. Can be row, column, data field, or null (only in the case of grand total)
-
getRowSize
Returns the row size in pixel.Note that the cell field always from 0 to m, and the returned value is never negative.
- Parameters:
table- the PivottablerowContext- information of the corresponding rowfield- the field corresponds to the leaf row cell. Can be row, column, data field, or null (only in the case of grand total)
-