public class SimplePivotRenderer extends Object implements PivotRendererExt
Constructor and Description |
---|
SimplePivotRenderer() |
Modifier and Type | Method and Description |
---|---|
int |
getColumnSize(Pivottable table,
PivotHeaderContext colc,
PivotField field)
Returns the column size in pixel.
|
int |
getRowSize(Pivottable table,
PivotHeaderContext rowc,
PivotField field)
Returns the row size in pixel.
|
String |
renderCell(Number data,
Pivottable table,
PivotHeaderContext rowContext,
PivotHeaderContext columnContext,
PivotField dataField)
Renders the content of each cell.
|
String |
renderCellSClass(Number data,
Pivottable table,
PivotHeaderContext rowContext,
PivotHeaderContext columnContext,
PivotField dataField)
Specify a CSS class on the cell.
|
String |
renderCellStyle(Number data,
Pivottable table,
PivotHeaderContext rowContext,
PivotHeaderContext columnContext,
PivotField dataField)
Specify the CSS style on the cell.
|
String |
renderDataField(PivotField field)
Renders the label of a data field, shown when there are multiple data fields.
|
String |
renderField(Object data,
Pivottable table,
PivotField field)
Renders the label of a header field in columns and rows.
|
String |
renderGrandTotalField(Pivottable table,
PivotField field)
Renders the title of a grand total field.
|
String |
renderSubtotalField(Object data,
Pivottable table,
PivotField field,
Calculator calculator)
Renders the label of a subtotal field.
|
public String renderCell(Number data, Pivottable table, PivotHeaderContext rowContext, PivotHeaderContext columnContext, PivotField dataField)
PivotRenderer
renderCell
in interface PivotRenderer
data
- data objectrowContext
- row header context objectcolumnContext
- column header context objectPivotHeaderContext
public int getColumnSize(Pivottable table, PivotHeaderContext colc, PivotField field)
PivotRenderer
Note that the cell field always from 0 to m, and the returned value is never negative.
getColumnSize
in interface PivotRenderer
table
- the Pivottablecolc
- 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)public int getRowSize(Pivottable table, PivotHeaderContext rowc, PivotField field)
PivotRenderer
Note that the cell field always from 0 to m, and the returned value is never negative.
getRowSize
in interface PivotRenderer
table
- the Pivottablerowc
- 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)public String renderField(Object data, Pivottable table, PivotField field)
PivotRenderer
renderField
in interface PivotRenderer
data
- data objectfield
- PivotFieldPivotField
public String renderGrandTotalField(Pivottable table, PivotField field)
PivotRenderer
renderGrandTotalField
in interface PivotRenderer
field
- a data PivotFieldpublic String renderSubtotalField(Object data, Pivottable table, PivotField field, Calculator calculator)
PivotRenderer
renderSubtotalField
in interface PivotRenderer
data
- data objectfield
- PivotFieldcalculator
- the subtotal calculatorPivotField
,
Calculator
public String renderDataField(PivotField field)
PivotRenderer
renderDataField
in interface PivotRenderer
public String renderCellSClass(Number data, Pivottable table, PivotHeaderContext rowContext, PivotHeaderContext columnContext, PivotField dataField)
PivotRendererExt
renderCellSClass
in interface PivotRendererExt
data
- data objectrowContext
- row header context objectcolumnContext
- column header context objectPivotHeaderContext
public String renderCellStyle(Number data, Pivottable table, PivotHeaderContext rowContext, PivotHeaderContext columnContext, PivotField dataField)
PivotRendererExt
renderCellStyle
in interface PivotRendererExt
data
- data objectrowContext
- row header context objectcolumnContext
- column header context objectPivotHeaderContext
Copyright © 2017. All rights reserved.