public class PivotTableBuilder extends Object
Builder for a PivotTable
component
The typical usage is:
PivotTable table = new PivotTableBuilder(new TextTableInput("./input/expenses.csv", ",")) .addDataColumn(new DefaultDataColumn("Month",0)) .addHeaderRow(new DefaultPivotHeaderRow(1)) .pivotData(new DefaultPivotData(2)) .build();
PivotTable
Constructor and Description |
---|
PivotTableBuilder(TableInput input)
constructor for this builder based on the provided input
|
Modifier and Type | Method and Description |
---|---|
PivotTableBuilder |
addDataColumn(DataColumn dataCol) |
PivotTableBuilder |
addGroupColumn(GroupColumn groupCol) |
PivotTableBuilder |
addHeaderRow(PivotHeaderRow headerRow) |
PivotTable |
build() |
PivotTableBuilder |
dataColumns(List<DataColumn> dataCols) |
PivotTableBuilder |
groupColumns(List<GroupColumn> groupCols) |
PivotTableBuilder |
headerRows(List<PivotHeaderRow> headerRows) |
PivotTableBuilder |
input(TableInput input)
Deprecated.
|
PivotTableBuilder |
pivotData(PivotData data) |
PivotTableBuilder |
showDataRows() |
PivotTableBuilder |
showDataRows(boolean show) |
PivotTableBuilder |
showGrandTotal() |
PivotTableBuilder |
showGrandTotal(boolean show) |
PivotTableBuilder |
showTotals() |
PivotTableBuilder |
showTotals(boolean show) |
PivotTableBuilder |
sortValues() |
public PivotTableBuilder(TableInput input)
input
- the input for this componentpublic PivotTableBuilder showTotals(boolean show)
public PivotTableBuilder showTotals()
public PivotTableBuilder showGrandTotal(boolean show)
public PivotTableBuilder showGrandTotal()
public PivotTableBuilder showDataRows(boolean show)
public PivotTableBuilder showDataRows()
public PivotTableBuilder sortValues()
@Deprecated public PivotTableBuilder input(TableInput input)
public PivotTableBuilder dataColumns(List<DataColumn> dataCols)
public PivotTableBuilder addDataColumn(DataColumn dataCol)
public PivotTableBuilder groupColumns(List<GroupColumn> groupCols)
public PivotTableBuilder addGroupColumn(GroupColumn groupCol)
public PivotTableBuilder headerRows(List<PivotHeaderRow> headerRows)
public PivotTableBuilder addHeaderRow(PivotHeaderRow headerRow)
public PivotTableBuilder pivotData(PivotData data)
public PivotTable build()
Copyright © 2006–2015. All rights reserved.