Package io.keikai.model.impl
Class PivotTableImpl
java.lang.Object
io.keikai.model.impl.PivotTableImpl
- All Implemented Interfaces:
SPivotTable,Serializable
Default implementation of
SPivotTable.- Since:
- 7.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.model.SPivotTable
SPivotTable.LayoutMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataField(SPivotDataField dataField) Adds a data field.voidaddField(SPivotField field) Adds a pivot field.Returns all fields defined in this pivot table.getCache()Returns the pivot cache backing this pivot table.Returns the fields placed on the column axis.Returns the data (value) fields.getField(int index) Returns the field at the specified index.getFieldByName(String name) Returns the first field matching the given name.Returns the output location of this pivot table on the sheet.getName()Returns the name of this pivot table.Returns the fields placed on the page (report filter) axis.Returns the fields placed on the row axis.booleanReturns whether compact layout is enabled.booleanReturns whether outline layout is enabled.booleanReturns whether the grand total column is shown.booleanReturns whether the grand total row is shown.booleanReturns whether tabular layout is enabled.voidrefresh()Refreshes the pivot table by re-reading data from the cache.voidsetCache(SPivotCache cache) voidsetCompactLayout(boolean compact) Sets compact layout mode.voidsetLocation(CellRegion location) voidSets the name of this pivot table.voidsetOutlineLayout(boolean outline) Sets outline layout mode.voidsetShowGrandTotalColumn(boolean show) Sets visibility of the grand total column.voidsetShowGrandTotalRow(boolean show) Sets visibility of the grand total row.voidsetTabularLayout(boolean tabular) Sets tabular layout mode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.keikai.model.SPivotTable
getLayoutMode, setLayoutMode
-
Constructor Details
-
PivotTableImpl
-
-
Method Details
-
getName
Description copied from interface:SPivotTableReturns the name of this pivot table.- Specified by:
getNamein interfaceSPivotTable- Returns:
- the pivot table name
-
setName
Description copied from interface:SPivotTableSets the name of this pivot table.- Specified by:
setNamein interfaceSPivotTable- Parameters:
name- the pivot table name
-
getLocation
Description copied from interface:SPivotTableReturns the output location of this pivot table on the sheet.- Specified by:
getLocationin interfaceSPivotTable- Returns:
- the cell region where the pivot table is rendered
-
setLocation
-
getCache
Description copied from interface:SPivotTableReturns the pivot cache backing this pivot table.- Specified by:
getCachein interfaceSPivotTable- Returns:
- the pivot cache
-
setCache
-
getRowFields
Description copied from interface:SPivotTableReturns the fields placed on the row axis.- Specified by:
getRowFieldsin interfaceSPivotTable- Returns:
- list of row fields
-
getColumnFields
Description copied from interface:SPivotTableReturns the fields placed on the column axis.- Specified by:
getColumnFieldsin interfaceSPivotTable- Returns:
- list of column fields
-
getDataFields
Description copied from interface:SPivotTableReturns the data (value) fields.- Specified by:
getDataFieldsin interfaceSPivotTable- Returns:
- list of data fields
-
getPageFields
Description copied from interface:SPivotTableReturns the fields placed on the page (report filter) axis.- Specified by:
getPageFieldsin interfaceSPivotTable- Returns:
- list of page fields
-
getAllFields
Description copied from interface:SPivotTableReturns all fields defined in this pivot table.- Specified by:
getAllFieldsin interfaceSPivotTable- Returns:
- list of all fields
-
getField
Description copied from interface:SPivotTableReturns the field at the specified index.- Specified by:
getFieldin interfaceSPivotTable- Parameters:
index- zero-based field index- Returns:
- the pivot field
-
getFieldByName
Description copied from interface:SPivotTableReturns the first field matching the given name.- Specified by:
getFieldByNamein interfaceSPivotTable- Parameters:
name- field name- Returns:
- the matching field, or null if not found
-
addField
Adds a pivot field.- Parameters:
field- the field to add
-
addDataField
Adds a data field.- Parameters:
dataField- the data field to add
-
isCompactLayout
public boolean isCompactLayout()Description copied from interface:SPivotTableReturns whether compact layout is enabled.- Specified by:
isCompactLayoutin interfaceSPivotTable- Returns:
- true if compact layout
-
setCompactLayout
public void setCompactLayout(boolean compact) Description copied from interface:SPivotTableSets compact layout mode. PreferSPivotTable.setLayoutMode(LayoutMode)for clarity — this setter is kept for backward compatibility.- Specified by:
setCompactLayoutin interfaceSPivotTable- Parameters:
compact- true to enable compact layout
-
isOutlineLayout
public boolean isOutlineLayout()Description copied from interface:SPivotTableReturns whether outline layout is enabled.- Specified by:
isOutlineLayoutin interfaceSPivotTable- Returns:
- true if outline layout
-
setOutlineLayout
public void setOutlineLayout(boolean outline) Description copied from interface:SPivotTableSets outline layout mode. PreferSPivotTable.setLayoutMode(LayoutMode).- Specified by:
setOutlineLayoutin interfaceSPivotTable- Parameters:
outline- true to enable outline layout
-
isTabularLayout
public boolean isTabularLayout()Description copied from interface:SPivotTableReturns whether tabular layout is enabled.- Specified by:
isTabularLayoutin interfaceSPivotTable- Returns:
- true if tabular layout
-
setTabularLayout
public void setTabularLayout(boolean tabular) Description copied from interface:SPivotTableSets tabular layout mode. PreferSPivotTable.setLayoutMode(LayoutMode).- Specified by:
setTabularLayoutin interfaceSPivotTable- Parameters:
tabular- true to enable tabular layout
-
isShowGrandTotalRow
public boolean isShowGrandTotalRow()Description copied from interface:SPivotTableReturns whether the grand total row is shown.- Specified by:
isShowGrandTotalRowin interfaceSPivotTable- Returns:
- true if the grand total row is visible
-
setShowGrandTotalRow
public void setShowGrandTotalRow(boolean show) Description copied from interface:SPivotTableSets visibility of the grand total row.- Specified by:
setShowGrandTotalRowin interfaceSPivotTable- Parameters:
show- true to show grand total row
-
isShowGrandTotalColumn
public boolean isShowGrandTotalColumn()Description copied from interface:SPivotTableReturns whether the grand total column is shown.- Specified by:
isShowGrandTotalColumnin interfaceSPivotTable- Returns:
- true if the grand total column is visible
-
setShowGrandTotalColumn
public void setShowGrandTotalColumn(boolean show) Description copied from interface:SPivotTableSets visibility of the grand total column.- Specified by:
setShowGrandTotalColumnin interfaceSPivotTable- Parameters:
show- true to show grand total column
-
refresh
public void refresh()Description copied from interface:SPivotTableRefreshes the pivot table by re-reading data from the cache.Until the pivot calculation engine is implemented this throws
UnsupportedOperationException(fail-loud) rather than silently no-op'ing, so callers cannot mistake a stale table for a refreshed one.- Specified by:
refreshin interfaceSPivotTable
-