Package io.jmix.pivottable.component
Interface PivotTable
- All Superinterfaces:
- Component,- Component.BelongToFrame,- Component.Editable,- Component.HasCaption,- Component.HasDescription
- All Known Implementing Classes:
- PivotTableImpl
public interface PivotTable
extends Component, Component.BelongToFrame, Component.Editable, Component.HasCaption
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classDescribes PivotTable cell click event.static classDescribes PivotTable refresh event.Nested classes/interfaces inherited from interface io.jmix.ui.component.ComponentComponent.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
- 
Field SummaryFieldsFields inherited from interface io.jmix.ui.component.ComponentAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAggregationProperties(String... aggregationProperties) Adds an array of properties names to prepopulate in vals area (gets passed to aggregator generating function).Adds a listener to the pivot table cell click events.voidaddColumns(String... cols) Adds an array of property names to use as columns.voidAdds a data item to data provider.voidaddExclusions(String property, String... exclusions) Adds a values to given key of exclusions map.voidaddHiddenFromAggregations(String... hiddenFromAggregations) Adds an array of properties names to omit from the aggregation arguments dropdowns.voidaddHiddenFromDragDrop(String... hiddenFromDragDrop) Adds an array of properties names to omit from the drag'n'drop portion of the UI.voidaddHiddenProperties(String... hiddenProperties) Adds an array of properties names to omit from the UI.voidaddInclusions(String property, String... inclusions) Adds a values to given key of inclusions map.voidaddProperties(Map<String, String> properties) Adds a map whose keys areDataItemproperty names to use as pivot table data and values they localized names.voidaddProperty(String property, String value) Add a property eith its localized valueaddRefreshListener(Consumer<PivotTable.RefreshEvent> refreshListener) Adds a listener to the pivot table refresh events.voidAdds an array of properties names to use as rows.getRows()isShowUI()voidrepaint()Resend all items and properties to client and repaint pivot table.voidsetAggregation(Aggregation aggregation) Sets the aggregation object.voidsetAggregationProperties(List<String> aggregationProperties) Sets the list of properties names to prepopulate in vals area (gets passed to aggregator generating function).voidsetAggregations(Aggregations aggregations) Sets the aggregations object which defines the collection of aggregations to use in pivot table and additional settings for them.voidsetAutoSortUnusedProperties(Boolean autoSortUnusedProperties) Controls whether or not unused properties are kept sorted in the UI.voidsetColumnOrder(ColumnOrder columnOrder) Set the order in which column data is provided to the renderer.voidsetColumns(List<String> cols) Sets the list of property names to use as columns.voidsetDataProvider(DataProvider dataProvider) Sets data provider for PivotTable.voidsetDerivedProperties(DerivedProperties derivedProperties) Sets object to define derived properties.voidsetEmptyDataMessage(String emptyDataMessage) Sets the message that will be displayed in case of empty data.voidsetExclusions(String property, List<String> exclusions) Sets the value of exclusions map.voidsetExclusions(Map<String, List<String>> exclusions) Sets map whose keys are properties names and values are lists of properties values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.voidsetFilterFunction(JsFunction filter) Sets theJsFunctionwhich defines a javascript code called on each record, returnsfalseif the record is to be excluded from the input before rendering ortrueotherwisevoidsetHiddenFromAggregations(List<String> hiddenFromAggregations) Sets the list of properties names to omit from the aggregation arguments dropdowns.voidsetHiddenFromDragDrop(List<String> hiddenFromDragDrop) Sets the list of properties names to omit from the drag'n'drop portion of the UI.voidsetHiddenProperties(List<String> hiddenProperties) Sets the list of properties names to omit from the UI.voidsetInclusions(String property, List<String> inclusions) Sets the value of inclusions map.voidsetInclusions(Map<String, List<String>> inclusions) Sets map whose keys are properties names and values are lists of properties values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesexclusions).voidsetMenuLimit(Integer menuLimit) Sets maximum number of values to list in the double-click menu.voidsetNativeJson(String json) Set additional JSON configuration as a string.voidsetProperties(Map<String, String> properties) Sets the map whose keys areDataItemproperty names to use as pivot table data and values they localized names.voidsetRenderer(Renderer renderer) Sets the renderer object.voidsetRendererOptions(RendererOptions rendererOptions) Sets object passed through to renderer as options.voidsetRenderers(Renderers renderers) Sets the renderers object which defines the collection of renderers to use in pivot table and additional settings for them.voidsetRowOrder(RowOrder rowOrder) Sets the order in which row data is provided to the renderer.voidSets the list of properties names to use as rows.voidsetShowColTotals(Boolean showColTotals) Setfalseif col totals shouldn't be shown andtrueotherwise.voidsetShowRowTotals(Boolean showRowTotals) Setfalseif row totals shouldn't be shown andtrueotherwise.voidHides or shows UI elements in the editable pivot table.voidsetSortersFunction(JsFunction sorters) Sets theJsFunctionwhich defines a javascript code called with an property name and can return a function which can be used as an argument toArray.sortfor output purposes.voidsetUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical) Controls whether or not unused properties are shown vertically instead of the default which is horizontally.Methods inherited from interface io.jmix.ui.component.ComponentaddStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFramegetFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.EditableisEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.HasCaptiongetCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescriptiongetDescription, setDescription
- 
Field Details- 
NAME- See Also:
 
 
- 
- 
Method Details- 
repaintvoid repaint()Resend all items and properties to client and repaint pivot table. Use this method if you change some property of already displayed pivot table.
- 
getProperties- Returns:
- the map whose keys are DataItemproperty names to use as pivot table data and values they localized names
 
- 
setPropertiesSets the map whose keys areDataItemproperty names to use as pivot table data and values they localized names.- Parameters:
- properties- a map of properties names with localized values
 
- 
addPropertiesAdds a map whose keys areDataItemproperty names to use as pivot table data and values they localized names.- Parameters:
- properties- a map of properties names with localized values
 
- 
addPropertyAdd a property eith its localized value- Parameters:
- property- property name
- value- localized value
 
- 
getRows- Returns:
- the list of properties names to use as rows.
 
- 
setRowsSets the list of properties names to use as rows.- Parameters:
- rows- a list of properties names
 
- 
addRowsAdds an array of properties names to use as rows.- Parameters:
- rows- an array of properties names
 
- 
getColumns- Returns:
- the list of property names to use as columns.
 
- 
setColumnsSets the list of property names to use as columns.- Parameters:
- cols- a list of properties names
 
- 
addColumnsAdds an array of property names to use as columns.- Parameters:
- cols- an array of properties names
 
- 
getAggregationAggregation getAggregation()- Returns:
- the aggregation object which defines how pivot table will aggregate results per cell
 
- 
setAggregationSets the aggregation object.Applies only when editable=false.- Parameters:
- aggregation- an aggregation object
 
- 
getRendererRenderer getRenderer()- Returns:
- the renderer object which generates output from pivot data structure
 
- 
setRendererSets the renderer object.Applies only when editable=false.- Parameters:
- renderer- a renderer object
 
- 
getAggregationProperties- Returns:
- the list of properties names to prepopulate in vals area (gets passed to aggregator generating function)
 
- 
setAggregationPropertiesSets the list of properties names to prepopulate in vals area (gets passed to aggregator generating function).Applies only when editable=true.- Parameters:
- aggregationProperties- a list of properties names
 
- 
addAggregationPropertiesAdds an array of properties names to prepopulate in vals area (gets passed to aggregator generating function).Applies only when editable=true.- Parameters:
- aggregationProperties- an array of properties names
 
- 
getAggregationsAggregations getAggregations()- Returns:
- the aggregations object which defines the collection of aggregations to use in pivot table and additional settings for them.
 
- 
setAggregationsSets the aggregations object which defines the collection of aggregations to use in pivot table and additional settings for them.Applies only when editable=true.- Parameters:
- aggregations- an aggregations object
 
- 
getRenderersRenderers getRenderers()- Returns:
- the renderers object which defines the collection of renderers to use in pivot table and additional settings for them.
 
- 
setRenderersSets the renderers object which defines the collection of renderers to use in pivot table and additional settings for them.Applies only when editable=true.- Parameters:
- renderers- a renderers object
 
- 
getHiddenProperties- Returns:
- the list of properties names to omit from the UI
 
- 
setHiddenPropertiesSets the list of properties names to omit from the UI.Applies only when editable=true.- Parameters:
- hiddenProperties- a list of properties names
 
- 
addHiddenPropertiesAdds an array of properties names to omit from the UI.Applies only when editable=true.- Parameters:
- hiddenProperties- an array of properties names
 
- 
getHiddenFromAggregations- Returns:
- list of properties names to omit from the aggregation arguments dropdowns
 
- 
setHiddenFromAggregationsSets the list of properties names to omit from the aggregation arguments dropdowns.Applies only when editable=true.- Parameters:
- hiddenFromAggregations- a list of properties names
 
- 
addHiddenFromAggregationsAdds an array of properties names to omit from the aggregation arguments dropdowns.Applies only when editable=true.- Parameters:
- hiddenFromAggregations- an array of properties names
 
- 
getHiddenFromDragDrop- Returns:
- list of properties names to omit from the drag'n'drop portion of the UI
 
- 
setHiddenFromDragDropSets the list of properties names to omit from the drag'n'drop portion of the UI.Applies only when editable=true.- Parameters:
- hiddenFromDragDrop- a list of properties names
 
- 
addHiddenFromDragDropAdds an array of properties names to omit from the drag'n'drop portion of the UI.Applies only when editable=true.- Parameters:
- hiddenFromDragDrop- an array of properties names
 
- 
getColumnOrderColumnOrder getColumnOrder()- Returns:
- the order in which column data is provided to the renderer
 
- 
setColumnOrderSet the order in which column data is provided to the renderer.Ordering by value orders by column total. - Parameters:
- columnOrder- the order in which column data is provided to the renderer
 
- 
getRowOrderRowOrder getRowOrder()- Returns:
- the order in which row data is provided to the renderer
 
- 
setRowOrderSets the order in which row data is provided to the renderer.Ordering by value orders by row total. - Parameters:
- rowOrder- the order in which row data is provided to the renderer
 
- 
getMenuLimitInteger getMenuLimit()- Returns:
- maximum number of values to list in the double-click menu
 
- 
setMenuLimitSets maximum number of values to list in the double-click menu.Applies only when editable=true.- Parameters:
- menuLimit- maximum number of values to list in the double-click menu
 
- 
getAutoSortUnusedPropertiesBoolean getAutoSortUnusedProperties()- Returns:
- trueif unused properties are kept sorted in the UI and- falseotherwise
 
- 
setAutoSortUnusedPropertiesControls whether or not unused properties are kept sorted in the UI.Applies only when editable=true.- Parameters:
- autoSortUnusedProperties-- trueif unused properties are kept sorted in the UI and- falseotherwise
 
- 
getUnusedPropertiesVerticalUnusedPropertiesVertical getUnusedPropertiesVertical()- Returns:
- trueif unused attributes are shown always vertical,- falseif always horizontal. If set to a number (as is the default) then if the properties' names' combined length in characters exceeds the number then the properties will be shown vertically.
 
- 
setUnusedPropertiesVerticalControls whether or not unused properties are shown vertically instead of the default which is horizontally.truemeans always vertical,falsemeans always horizontal. If set to a number (as is the default) then if the properties' names' combined length in characters exceeds the number then the properties will be shown vertically.Applies only when editable=true.- Parameters:
- unusedPropertiesVertical- properties
 
- 
getDataProviderDataProvider getDataProvider()- Returns:
- data provider for PivotTable. Contains items which will be shown on PivotTable.
 
- 
setDataProviderSets data provider for PivotTable. Contains items which will be shown on PivotTable.- Parameters:
- dataProvider- a data provider
 
- 
addDataAdds a data item to data provider.- Parameters:
- dataItems- a data item to add
 
- 
getFilterFunctionJsFunction getFilterFunction()- Returns:
- the JsFunctionwhich defines a javascript code called on each record, returnsfalseif the record is to be excluded from the input before rendering ortrueotherwise
 
- 
setFilterFunctionSets theJsFunctionwhich defines a javascript code called on each record, returnsfalseif the record is to be excluded from the input before rendering ortrueotherwise- Parameters:
- filter- a- JsFunctionto use as a filter
 
- 
getSortersFunctionJsFunction getSortersFunction()- Returns:
- the JsFunctionwhich defines a javascript code called with an property name and can return a function which can be used as an argument toArray.sortfor output purposes. If no function is returned, the default sorting mechanism is a built-in "natural sort" implementation. Useful for sorting attributes like month names
 
- 
setSortersFunctionSets theJsFunctionwhich defines a javascript code called with an property name and can return a function which can be used as an argument toArray.sortfor output purposes. If no function is returned, the default sorting mechanism is a built-in "natural sort" implementation. Useful for sorting attributes like month names- Parameters:
- sorters- a- JsFunctionto use as a sorters
 
- 
getRendererOptionsRendererOptions getRendererOptions()- Returns:
- the object passed through to renderer as options
 
- 
setRendererOptionsSets object passed through to renderer as options.- Parameters:
- rendererOptions- object defines renderer options
 
- 
getInclusions- Returns:
- map whose keys are properties names and values are lists of properties values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click
 
- 
setInclusionsSets map whose keys are properties names and values are lists of properties values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesexclusions).Applies only when editable=true.- Parameters:
- inclusions- map with properties and values included in rendering
- See Also:
 
- 
setInclusionsSets the value of inclusions map.- Parameters:
- property- property name
- inclusions- a list of properties values
- See Also:
 
- 
addInclusionsAdds a values to given key of inclusions map.- Parameters:
- property- a property name
- inclusions- an array of properties values
- See Also:
 
- 
getExclusions- Returns:
- map whose keys are properties names and values are lists of properties values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click
 
- 
setExclusionsSets map whose keys are properties names and values are lists of properties values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.Applies only when editable=true.- Parameters:
- exclusions- map with properties and values excluded from rendering
- See Also:
 
- 
setExclusionsSets the value of exclusions map.- Parameters:
- property- property name
- exclusions- a list of properties values
- See Also:
 
- 
addExclusionsAdds a values to given key of exclusions map.- Parameters:
- property- a property name
- exclusions- an array of properties values
- See Also:
 
- 
getDerivedPropertiesDerivedProperties getDerivedProperties()- Returns:
- object to define derived properties
 
- 
setDerivedPropertiesSets object to define derived properties.- Parameters:
- derivedProperties- object to define derived properties
 
- 
setNativeJsonSet additional JSON configuration as a string. This JSON can override configuration loaded from XML and from Component API.- Parameters:
- json- additional JSON configuration
 
- 
getNativeJsonString getNativeJson()- Returns:
- additional JSON configuration as a string.
 
- 
getEmptyDataMessageString getEmptyDataMessage()- Returns:
- the message that will be displayed in case of empty data
 
- 
setShowUIHides or shows UI elements in the editable pivot table.trueby default.
 Applies only wheneditable=true.- Parameters:
- showUI-- trueif UI elements should be shown and- falseotherwise
 
- 
isShowUIBoolean isShowUI()- Returns:
- trueif- pivotUI()should be shown and- falseotherwise
 
- 
setShowRowTotalsSetfalseif row totals shouldn't be shown andtrueotherwise. Works only for table renderers.trueby default.- Parameters:
- showRowTotals-- falseif row totals shouldn't be shown and- trueotherwise
 
- 
isRowTotalsShownBoolean isRowTotalsShown()- Returns:
- falseif row totals shouldn't be shown and- trueotherwise
 
- 
setShowColTotalsSetfalseif col totals shouldn't be shown andtrueotherwise. Works only for table renderers.trueby default.- Parameters:
- showColTotals-- falseif col totals shouldn't be shown and- trueotherwise
 
- 
isColTotalsShownBoolean isColTotalsShown()- Returns:
- falseif col totals shouldn't be shown and- trueotherwise
 
- 
setEmptyDataMessageSets the message that will be displayed in case of empty data.- Parameters:
- emptyDataMessage- the message that will be displayed in case of empty data
 
- 
addRefreshListenerAdds a listener to the pivot table refresh events. Fired only for editable PivotTable.- Parameters:
- refreshListener- a listener to add
- Returns:
- subscription
 
- 
addCellClickListenerAdds a listener to the pivot table cell click events. Fired only for table renderers (table, heatmap, table barchart, col heatmap, row heatmap).- Parameters:
- listener- a listener to add
- Returns:
- subscription
 
 
-