Class PivotTable
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
org.vaadin.addons.componentfactory.PivotTable
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
@StyleSheet("context://c3/c3.min.css") @StyleSheet("context://pivottable/dist/pivot.css")
@JavaScript("context://jquery/dist/jquery.min.js") @JavaScript("context://jqueryui/jquery-ui.min.js") @JavaScript("context://d3/build/d3.min.js") @JavaScript("context://c3/c3.min.js") @JavaScript("context://pivottable/dist/pivot.min.js") @JavaScript("context://pivottable/dist/c3_renderers.min.js") @JavaScript("context://pivottable/dist/export_renderers.min.js") @JavaScript("context://tabletojson/lib/jquery.tabletojson.min.js") @JavaScript("./pivot_connector.js")
@CssImport("./lumo-pivot.css")
public class PivotTable
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbastract base class for Pivot data models.final classUtility helpers for valid renderer strings.static classPivot dataa model that auto creates based on list of beans using introspection.static classstatic classData model for PivotTable.static enumThe mode, PivotMode.INTERACTIVE renders with Pivot UI.static classOptions for PivotTablestatic classPivotTable.PivotRefreshedEvent<R extends PivotTable>static classLocalization object for the PivotTablefinal classUtility helpers for valid renderer strings. -
Constructor Summary
ConstructorsConstructorDescriptionPivotTable(PivotTable.AbstractPivotData pivotData, PivotTable.PivotOptions pivotOptions, PivotTable.PivotMode mode) Create PivotTable using given data and options.PivotTable(PivotTable.PivotData pivotData, PivotTable.PivotOptions pivotOptions) Create PivotTable using PivotMode.NONINTERACTIVE and given data and options. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddPivotReftreshedListener(com.vaadin.flow.component.ComponentEventListener<PivotTable.PivotRefreshedEvent<PivotTable>> listener) voidfetchResult(com.vaadin.flow.function.SerializableConsumer<tools.jackson.databind.JsonNode> callback) Fecth the current table result as Json.getI18n()Get the localization object.protected voidonAttach(com.vaadin.flow.component.AttachEvent event) voidSet new i18n object in use and send values to client.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
PivotTable
Create PivotTable using PivotMode.NONINTERACTIVE and given data and options.- Parameters:
pivotData- PivotDatapivotOptions- PivotOptioms
-
PivotTable
public PivotTable(PivotTable.AbstractPivotData pivotData, PivotTable.PivotOptions pivotOptions, PivotTable.PivotMode mode) Create PivotTable using given data and options.- Parameters:
pivotData- PivotDatapivotOptions- PivotOptiomsmode- The mode, PivotMode.INTERACTIVE renders PivotTable with interactive UI.
-
-
Method Details
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent event) - Overrides:
onAttachin classcom.vaadin.flow.component.Component
-
fetchResult
public void fetchResult(com.vaadin.flow.function.SerializableConsumer<tools.jackson.databind.JsonNode> callback) Fecth the current table result as Json. The result will be empty array if the renderer is not a Table type.- Parameters:
callback- Lambda function to be executed, gets fetched JsonValue as parameter.
-
addPivotReftreshedListener
public com.vaadin.flow.shared.Registration addPivotReftreshedListener(com.vaadin.flow.component.ComponentEventListener<PivotTable.PivotRefreshedEvent<PivotTable>> listener) -
setI18n
Set new i18n object in use and send values to client.- Parameters:
i18n- The PivotTableI18n object.
-
getI18n
Get the localization object.- Returns:
- PivotTableI18n
-