SummaryPlugin class is used to display summary rows in a DataTable . Summary rows provide aggregate information about the data in the table.
Usage Example:
DataTable< Employee> dataTable = DataTable.create(dataList);
SummaryPlugin< Employee, SummaryData> summaryPlugin = new SummaryPlugin<> ();
dataTable.addPlugin(summaryPlugin);
summaryPlugin.setSummaryRecords(summaryDataList);
T
The type of data in the DataTable.
S
The type of data in the summary row.
public void init(DataTable<T> dataTable)
dataTable
The DataTable to which this plugin is added.
public void onFooterAdded(DataTable<T> datatable)
datatable
The DataTable to which the footer is added.
public SummaryPlugin<T, S> setSummaryRecords(Collection<S> records)
records
A collection of summary records.
This SummaryPlugin instance.
public SummaryPlugin<T, S> setConfig(SummaryPluginConfig config)
config
The SummaryPlugin to set.
The SummaryPlugin instance.
public SummaryPluginConfig getConfig()
The current SummaryPluginConfig.
public int order()
The order value for this plugin.