Class JmixPivotTable<T>
- Type Parameters:
- T- type of items contained
- All Implemented Interfaces:
- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasEnabled,- com.vaadin.flow.component.HasSize,- com.vaadin.flow.component.HasStyle,- Serializable
- Direct Known Subclasses:
- PivotTable
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected static final Stringprotected final List<JmixPivotTable.PendingJsFunction>protected JmixPivotTableItems<T>protected com.vaadin.flow.shared.Registrationprotected PivotTableOptionsprotected JmixPivotTableSerializerprotected com.vaadin.flow.internal.StateTree.ExecutionRegistrationprotected com.vaadin.flow.internal.StateTree.ExecutionRegistration
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAggregationProperties(String... aggregationProperties) Original property name:vals.com.vaadin.flow.shared.RegistrationaddCellClickListener(com.vaadin.flow.component.ComponentEventListener<PivotTableCellClickEvent<T>> listener) Adds a listener to the pivot table cell click events.voidaddColumns(String... columns) Adds an array of attribute names to use as cols.voidaddExclusions(String property, String... exclusions) Adds property values to a given property which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.voidaddHiddenFromAggregations(String... hiddenFromAggregations) Adds attribute names to omit from the aggregation arguments dropdowns.voidaddHiddenFromDragDrop(String... hiddenFromDragDrop) Adds attribute names to omit from the drag'n'drop portion of the UI.voidaddHiddenProperties(String... hiddenProperties) Adds attribute names to omit from the UI.voidaddInclusions(String property, String... inclusions) Adds property values to a given property which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).voidaddProperties(Map<String, String> properties) Adds properties and their localized valuesvoidaddProperty(String property, String value) Adds property and its localized valuecom.vaadin.flow.shared.RegistrationaddRefreshEventListener(com.vaadin.flow.component.ComponentEventListener<PivotTableRefreshEvent> listener) Adds a listener to the pivot table refresh events.voidAdds an array of attribute names to use as rows.protected voidcallJsFunction(String function, elemental.json.JsonObject resultJson) protected voidcallPendingJsFunction(String function, elemental.json.JsonObject resultJson) Execute JavaScript function with theresultJsonpassed.protected PivotTableOptionsprotected JmixPivotTableSerializergetItems()getRows()protected voidprotected voidisShowUI()protected voidonAttach(com.vaadin.flow.component.AttachEvent attachEvent) protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent) protected voidprotected voidonRefresh(PivotTableRefreshEvent event) protected voidperformUpdateItems(com.vaadin.flow.internal.ExecutionContext context) protected voidperformUpdateOptions(com.vaadin.flow.internal.ExecutionContext context) protected voidready()protected voidprotected voidvoidsetAggregation(Aggregation aggregation) Original property name:aggregator.voidsetAggregationProperties(List<String> aggregationProperties) Original property name:vals.voidsetAggregations(Aggregations aggregations) Original property name:aggregators.voidsetAutoSortUnusedProperties(Boolean autoSortUnusedProperties) Original property name:autoSortUnusedAttrs.voidsetColumnOrder(Order columnOrder) Sets the order in which column data is provided to the renderer.voidsetColumns(List<String> columns) Sets a collection of attribute names to use as cols.voidsetDerivedProperties(DerivedProperties derivedProperties) Original property name:derivedAttributes.voidsetEmptyDataMessage(String emptyDataMessage) Sets the message that will be displayed in case of empty data.voidsetExclusions(String property, List<String> exclusions) Sets a list whose values are arrays of attribute values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.voidsetExclusions(Map<String, List<String>> exclusions) Sets a map whose keys are attribute names and values are arrays of attribute values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.voidsetFilterFunction(JsFunction filter) Original property name:filter.voidsetHiddenFromAggregations(List<String> hiddenFromAggregations) Sets attribute names to omit from the aggregation arguments dropdowns.voidsetHiddenFromDragDrop(List<String> hiddenFromDragDrop) Sets attribute names to omit from the drag'n'drop portion of the UI.voidsetHiddenProperties(List<String> hiddenProperties) Sets attribute names to omit from the UI.voidsetInclusions(String property, List<String> inclusions) Sets a list whose values are arrays of attribute values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).voidsetInclusions(Map<String, List<String>> inclusions) Sets a map whose keys are attribute names and values are arrays of attribute values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).voidsetItems(JmixPivotTableItems<T> items) Sets theJmixPivotTableItemsinstance to use as data provider.voidsetMenuLimit(Integer menuLimit) Sets the maximum number of values to list in the attribute values dialogvoidsetProperties(Map<String, String> properties) Sets properties and their localized valuesvoidsetRenderer(Renderer renderer) Sets a descriptor of an object which will generate output from pivot data structure (see documentation).voidsetRendererOptions(RendererOptions rendererOptions) Sets an object that is passed through to renderer as options.voidsetRenderers(Renderers renderers) Sets an object that represents a list of rendering functions (see documentation).voidsetRowOrder(Order rowOrder) Sets the order in which row data is provided to the renderer.voidSets a collection of attribute names to use as rows.voidsetShowColumnTotals(Boolean showColumnTotals) Shows an additional column of totals for each colvoidsetShowRowTotals(Boolean showRowTotals) Shows an additional column of totals for each rowvoidShow pivot table in the UI mode.voidsetSortersFunction(JsFunction sorters) Original property name:sorters.voidsetUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical) Original property name:unusedAttrsVertical.protected voidMethods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElementgetElementMethods inherited from interface com.vaadin.flow.component.HasEnabledisEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasSizegetHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
- 
Field Details- 
DATA_ITEM_ID_PROPERTY_NAME- See Also:
 
- 
jmixPivotTableItems
- 
jmixPivotTableItemsChangeRegistrationprotected com.vaadin.flow.shared.Registration jmixPivotTableItemsChangeRegistration
- 
options
- 
serializer
- 
clientReadyprotected volatile boolean clientReady
- 
functions
- 
synchronizeOptionsExecutionprotected com.vaadin.flow.internal.StateTree.ExecutionRegistration synchronizeOptionsExecution
- 
synchronizeItemsExecutionprotected com.vaadin.flow.internal.StateTree.ExecutionRegistration synchronizeItemsExecution
 
- 
- 
Constructor Details- 
JmixPivotTablepublic JmixPivotTable()
 
- 
- 
Method Details- 
getItems
- 
addRefreshEventListenerpublic com.vaadin.flow.shared.Registration addRefreshEventListener(com.vaadin.flow.component.ComponentEventListener<PivotTableRefreshEvent> listener) Adds a listener to the pivot table refresh events. Fired only for editable PivotTable.- Parameters:
- listener- a listener to add
- Returns:
- subscription
 
- 
addCellClickListenerpublic com.vaadin.flow.shared.Registration addCellClickListener(com.vaadin.flow.component.ComponentEventListener<PivotTableCellClickEvent<T>> listener) Adds 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
 
- 
getProperties- Returns:
- map of properties and their localized values
 
- 
setPropertiesSets properties and their localized values- Parameters:
- properties- map with properties and their localized values
 
- 
addPropertiesAdds properties and their localized values- Parameters:
- properties- map with properties and their localized values
 
- 
addPropertyAdds property and its localized value- Parameters:
- property- property name
- value- property localized value
 
- 
getRows- Returns:
- a collection of attribute names to use as rows
 
- 
setRowsSets a collection of attribute names to use as rows.- Parameters:
- rows- a collection of attribute names to use as rows
 
- 
addRowsAdds an array of attribute names to use as rows.- Parameters:
- rows- an array of attribute names to add
 
- 
getColumns- Returns:
- a collection of attribute names to use as cols
 
- 
setColumnsSets a collection of attribute names to use as cols.- Parameters:
- columns- a collection of attribute names to use as cols
 
- 
addColumnsAdds an array of attribute names to use as cols.- Parameters:
- columns- an array of attribute names to add
 
- 
getAggregation- Returns:
- an object which will aggregate results per cell
 
- 
setAggregationOriginal property name:aggregator.Sets a descriptor of an object which will aggregate results per cell (see documentation). Applies only when this.isShowUI() == false.- Parameters:
- aggregation- an object which will aggregate results per cell
 
- 
getRenderer- Returns:
- an object which will generate output from pivot data structure
 
- 
setRendererSets a descriptor of an object which will generate output from pivot data structure (see documentation).Applies only when this.isShowUI() == false.- Parameters:
- renderer- an object which will generate output from pivot data structure
 
- 
getAggregationProperties- Returns:
- attribute names to prepopulate in vals area
 
- 
setAggregationPropertiesOriginal property name:vals.Sets attribute names to prepopulate in vals area (gets passed to aggregator generating function). Applies only when this.isShowUI() == true.- Parameters:
- aggregationProperties- attribute names to prepopulate in vals area
 
- 
addAggregationPropertiesOriginal property name:vals.Adds attribute names to prepopulate in vals area (gets passed to aggregator generating function). Applies only when this.isShowUI() == true.- Parameters:
- aggregationProperties- attribute names to prepopulate in vals area
 
- 
getAggregations- Returns:
- an object that represents a list of generators for aggregation functions in dropdown
 
- 
setAggregationsOriginal property name:aggregators.Sets an object that represents a list of generators for aggregation functions in dropdown (see documentation). Applies only when this.isShowUI() == true.- Parameters:
- aggregations- an object that represents a list of generators for aggregation functions in dropdown
 
- 
getRenderers- Returns:
- n object that represents a list of rendering functions
 
- 
setRenderersSets an object that represents a list of rendering functions (see documentation).Applies only when this.isShowUI() == true.- Parameters:
- renderers- n object that represents a list of rendering functions
 
- 
getHiddenProperties- Returns:
- attribute names to omit from the UI
 
- 
setHiddenPropertiesSets attribute names to omit from the UI.Applies only when this.isShowUI() == true.- Parameters:
- hiddenProperties- attribute names to omit from the UI
 
- 
addHiddenPropertiesAdds attribute names to omit from the UI.Applies only when this.isShowUI() == true.- Parameters:
- hiddenProperties- attribute names to omit from the UI
 
- 
getHiddenFromAggregations- Returns:
- attribute names to omit from the aggregation arguments dropdowns
 
- 
setHiddenFromAggregationsSets attribute names to omit from the aggregation arguments dropdowns.Applies only when this.isShowUI() == true.- Parameters:
- hiddenFromAggregations- attribute names to omit from the aggregation arguments dropdowns
 
- 
addHiddenFromAggregationsAdds attribute names to omit from the aggregation arguments dropdowns.Applies only when this.isShowUI() == true.- Parameters:
- hiddenFromAggregations- attribute names to omit from the aggregation arguments dropdowns
 
- 
getHiddenFromDragDrop- Returns:
- attribute names to omit from the drag'n'drop portion of the UI
 
- 
setHiddenFromDragDropSets attribute names to omit from the drag'n'drop portion of the UI.Applies only when this.isShowUI() == true.- Parameters:
- hiddenFromDragDrop- attribute names to omit from the drag'n'drop portion of the UI
 
- 
addHiddenFromDragDropAdds attribute names to omit from the drag'n'drop portion of the UI.Applies only when this.isShowUI() == true.- Parameters:
- hiddenFromDragDrop- attribute names to omit from the drag'n'drop portion of the UI
 
- 
getColumnOrder- Returns:
- the order in which column data is provided to the renderer
 
- 
setColumnOrderSets 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
 
- 
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
 
- 
getMenuLimit- Returns:
- the maximum number of values to list in the attribute values dialog
 
- 
setMenuLimitSets the maximum number of values to list in the attribute values dialogApplies only when this.isShowUI() == true.- Parameters:
- menuLimit- the maximum number of values to list in the attribute values dialog
 
- 
getAutoSortUnusedProperties- Returns:
- whether or not unused attributes are kept sorted in the UI
 
- 
setAutoSortUnusedPropertiesOriginal property name:autoSortUnusedAttrs.Sets whether or not unused attributes are kept sorted in the UI. Applies only when this.isShowUI() == true.- Parameters:
- autoSortUnusedProperties- whether or not unused attributes are kept sorted in the UI
 
- 
getUnusedPropertiesVertical- Returns:
- whether or not unused attributes are shown vertically
 
- 
setUnusedPropertiesVerticalOriginal property name:unusedAttrsVertical.Sets whether or not unused attributes 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 attributes' names' combined length in characters exceeds the number then the attributes will be shown vertically.Applies only when this.isShowUI() == true.- Parameters:
- unusedPropertiesVertical- whether or not unused attributes are shown vertically
 
- 
getFilterFunction- Returns:
- a filter function that is called on each record
 
- 
setFilterFunctionOriginal property name:filter.Sets a filter function that is called on each record, returns falseif the record is to be excluded from the input before rendering ortrueotherwise.- Parameters:
- filter- a filter function that is called on each record
 
- 
getSortersFunction- Returns:
- a sorter function
 
- 
setSortersFunctionOriginal property name:sorters.Sets a sorter function that is called with an attribute name and can return a function which can be used as an argument to Array.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 sorter function
 
- 
getRendererOptions- Returns:
- an object that is passed through to renderer as options
 
- 
setRendererOptionsSets an object that is passed through to renderer as options.- Parameters:
- rendererOptions- an object that is passed through to renderer as options
 
- 
getInclusions- Returns:
- a map whose keys are attribute names and values are arrays of attribute values
- See Also:
 
- 
setInclusionsSets a map whose keys are attribute names and values are arrays of attribute values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).Applies only when this.isShowUI() == true.- Parameters:
- inclusions- a map whose keys are attribute names and values are arrays of attribute values
- See Also:
 
- 
setInclusionsSets a list whose values are arrays of attribute values which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).Applies only when this.isShowUI() == true.- Parameters:
- property- a property for which set inclusions
- inclusions- a list of property values
- See Also:
 
- 
addInclusionsAdds property values to a given property which denote records to include in rendering; used to prepopulate the filter menus that appear on double-click (overridesgetExclusions()).Applies only when this.isShowUI() == true.- Parameters:
- property- a property for which set inclusions
- inclusions- an array of property values
- See Also:
 
- 
getExclusions- Returns:
- a map whose keys are attribute names and values are arrays of attribute values
 
- 
setExclusionsSets a map whose keys are attribute names and values are arrays of attribute values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.Applies only when this.isShowUI() == true.- Parameters:
- exclusions- a map whose keys are attribute names and values are arrays of attribute values
- See Also:
 
- 
setExclusionsSets a list whose values are arrays of attribute values which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.Applies only when this.isShowUI() == true.- Parameters:
- property- a property for which set exclusions
- exclusions- a map whose keys are attribute names and values are arrays of attribute values
- See Also:
 
- 
addExclusionsAdds property values to a given property which denote records to exclude from rendering; used to prepopulate the filter menus that appear on double-click.Applies only when this.isShowUI() == true.- Parameters:
- property- a property for which set exclusions
- exclusions- a map whose keys are attribute names and values are arrays of attribute values
- See Also:
 
- 
getDerivedProperties- Returns:
- an object that represents derived properties
 
- 
setDerivedPropertiesOriginal property name:derivedAttributes.Sets an object that represents derived properties (see documentation). - Parameters:
- derivedProperties- an object that represents derived properties
 
- 
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
 
- 
getEmptyDataMessage- Returns:
- the message that will be displayed in case of empty data
 
- 
setShowUIShow pivot table in the UI mode.- Parameters:
- showUI-- trueif pivot table UI is shown,- falseif not.
 
- 
isShowUI- Returns:
- trueif pivot table UI is shown,- falseif not.
 
- 
setShowRowTotalsShows an additional column of totals for each row- Parameters:
- showRowTotals-- trueif row totals are shown,- falseif not.
 
- 
isShowRowTotals- Returns:
- trueif row totals are shown,- falseif not.
 
- 
setShowColumnTotalsShows an additional column of totals for each col- Parameters:
- showColumnTotals-- trueif col totals are shown,- falseif not.
 
- 
isShowColumnTotals- Returns:
- trueif col totals are shown,- falseif not.
 
- 
setItemsSets theJmixPivotTableItemsinstance to use as data provider.- Parameters:
- items- the- JmixPivotTableItemsinstance to use
 
- 
initComponentprotected void initComponent()
- 
createOptions
- 
createSerializer
- 
initComponentListenersprotected void initComponentListeners()
- 
onOptionsChange
- 
onRefresh
- 
updateOptionsAfterRefresh
- 
requestUpdateOptionsprotected void requestUpdateOptions()
- 
requestUpdateItemsprotected void requestUpdateItems()
- 
performUpdateOptionsprotected void performUpdateOptions(com.vaadin.flow.internal.ExecutionContext context) 
- 
performUpdateItemsprotected void performUpdateItems(com.vaadin.flow.internal.ExecutionContext context) 
- 
onAttachprotected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
- onAttachin class- com.vaadin.flow.component.Component
 
- 
ready@ClientCallable protected void ready()
- 
onDetachprotected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent) - Overrides:
- onDetachin class- com.vaadin.flow.component.Component
 
- 
callPendingJsFunctionExecute JavaScript function with theresultJsonpassed. Execution will be delayed till the client-side is ready.- Parameters:
- function- JavaScript function to execute
- resultJson- resultJson
 
- 
callJsFunction
 
-