public interface PivotTable
extends com.haulmont.cuba.gui.components.Component, com.haulmont.cuba.gui.components.Component.BelongToFrame, com.haulmont.cuba.gui.components.Component.Editable, com.haulmont.cuba.gui.components.Component.HasCaption
Modifier and Type | Interface and Description |
---|---|
static class |
PivotTable.CellClickEvent
Describes PivotTable cell click event.
|
static class |
PivotTable.RefreshEvent
Describes PivotTable refresh event.
|
com.haulmont.cuba.gui.components.Component.Alignment, com.haulmont.cuba.gui.components.Component.BelongToFrame, com.haulmont.cuba.gui.components.Component.Disposable, com.haulmont.cuba.gui.components.Component.Editable, com.haulmont.cuba.gui.components.Component.Focusable, com.haulmont.cuba.gui.components.Component.HasCaption, com.haulmont.cuba.gui.components.Component.HasDescription, com.haulmont.cuba.gui.components.Component.HasIcon, com.haulmont.cuba.gui.components.Component.HasXmlDescriptor, com.haulmont.cuba.gui.components.Component.OptionsStyleProvider, com.haulmont.cuba.gui.components.Component.Wrapper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
void |
addAggregationProperties(java.lang.String... aggregationProperties)
Adds an array of properties names to prepopulate
in vals area (gets passed to aggregator generating function).
|
com.haulmont.bali.events.Subscription |
addCellClickListener(java.util.function.Consumer<PivotTable.CellClickEvent> listener)
Adds a listener to the pivot table cell click events.
|
void |
addColumns(java.lang.String... cols)
Adds an array of property names to use as columns.
|
void |
addData(DataItem... dataItems)
Adds a data item to data provider.
|
void |
addExclusions(java.lang.String property,
java.lang.String... exclusions)
Adds a values to given key of exclusions map.
|
void |
addHiddenFromAggregations(java.lang.String... hiddenFromAggregations)
Adds an array of properties names to omit from the aggregation arguments dropdowns.
|
void |
addHiddenFromDragDrop(java.lang.String... hiddenFromDragDrop)
Adds an array of properties names to omit from the drag'n'drop portion of the UI.
|
void |
addHiddenProperties(java.lang.String... hiddenProperties)
Adds an array of properties names to omit from the UI.
|
void |
addInclusions(java.lang.String property,
java.lang.String... inclusions)
Adds a values to given key of inclusions map.
|
void |
addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Adds a map whose keys are
DataItem property names to use as pivot table data
and values they localized names. |
void |
addProperty(java.lang.String property,
java.lang.String value)
Add a property eith its localized value
|
com.haulmont.bali.events.Subscription |
addRefreshListener(java.util.function.Consumer<PivotTable.RefreshEvent> refreshListener)
Adds a listener to the pivot table refresh events.
|
void |
addRows(java.lang.String... rows)
Adds an array of properties names to use as rows.
|
Aggregation |
getAggregation() |
java.util.List<java.lang.String> |
getAggregationProperties() |
Aggregations |
getAggregations() |
java.lang.Boolean |
getAutoSortUnusedProperties() |
ColumnOrder |
getColumnOrder() |
java.util.List<java.lang.String> |
getColumns() |
DataProvider |
getDataProvider() |
default com.haulmont.cuba.gui.data.CollectionDatasource |
getDatasource()
Deprecated.
use
getDataProvider() instead. |
DerivedProperties |
getDerivedProperties() |
java.lang.String |
getEmptyDataMessage() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getExclusions() |
JsFunction |
getFilterFunction() |
java.util.List<java.lang.String> |
getHiddenFromAggregations() |
java.util.List<java.lang.String> |
getHiddenFromDragDrop() |
java.util.List<java.lang.String> |
getHiddenProperties() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getInclusions() |
java.lang.Integer |
getMenuLimit() |
java.lang.String |
getNativeJson() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
Renderer |
getRenderer() |
RendererOptions |
getRendererOptions() |
Renderers |
getRenderers() |
RowOrder |
getRowOrder() |
java.util.List<java.lang.String> |
getRows() |
JsFunction |
getSortersFunction() |
UnusedPropertiesVertical |
getUnusedPropertiesVertical() |
java.lang.Boolean |
isColTotalsShown() |
java.lang.Boolean |
isRowTotalsShown() |
java.lang.Boolean |
isShowUI() |
void |
removeCellClickListener(java.util.function.Consumer<PivotTable.CellClickEvent> listener)
Deprecated.
Use
Subscription instead |
void |
removeRefreshListener(java.util.function.Consumer<PivotTable.RefreshEvent> refreshListener)
Deprecated.
Use
Subscription instead |
void |
repaint()
Resend all items and properties to client and repaint pivot table.
|
void |
setAggregation(Aggregation aggregation)
Sets the aggregation object.
|
void |
setAggregationProperties(java.util.List<java.lang.String> aggregationProperties)
Sets the list of properties names to prepopulate
in vals area (gets passed to aggregator generating function).
|
void |
setAggregations(Aggregations aggregations)
Sets the aggregations object which defines the collection of aggregations
to use in pivot table and additional settings for them.
|
void |
setAutoSortUnusedProperties(java.lang.Boolean autoSortUnusedProperties)
Controls whether or not unused properties are kept sorted in the UI.
|
void |
setColumnOrder(ColumnOrder columnOrder)
Set the order in which column data is provided to the renderer.
|
void |
setColumns(java.util.List<java.lang.String> cols)
Sets the list of property names to use as columns.
|
void |
setDataProvider(DataProvider dataProvider)
Sets data provider for PivotTable.
|
default void |
setDatasource(com.haulmont.cuba.gui.data.CollectionDatasource datasource)
Deprecated.
use
setDataProvider(DataProvider) instead. |
void |
setDerivedProperties(DerivedProperties derivedProperties)
Sets object to define derived properties.
|
void |
setEmptyDataMessage(java.lang.String emptyDataMessage)
Sets the message that will be displayed in case of empty data.
|
void |
setExclusions(java.util.Map<java.lang.String,java.util.List<java.lang.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.
|
void |
setExclusions(java.lang.String property,
java.util.List<java.lang.String> exclusions)
Sets the value of exclusions map.
|
void |
setFilterFunction(JsFunction filter)
Sets the
JsFunction which defines a javascript code
called on each record, returns false if the record is to be
excluded from the input before rendering or true otherwise |
void |
setHiddenFromAggregations(java.util.List<java.lang.String> hiddenFromAggregations)
Sets the list of properties names to omit from the aggregation arguments dropdowns.
|
void |
setHiddenFromDragDrop(java.util.List<java.lang.String> hiddenFromDragDrop)
Sets the list of properties names to omit from the drag'n'drop portion of the UI.
|
void |
setHiddenProperties(java.util.List<java.lang.String> hiddenProperties)
Sets the list of properties names to omit from the UI.
|
void |
setInclusions(java.util.Map<java.lang.String,java.util.List<java.lang.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 (overrides
exclusions ). |
void |
setInclusions(java.lang.String property,
java.util.List<java.lang.String> inclusions)
Sets the value of inclusions map.
|
void |
setMenuLimit(java.lang.Integer menuLimit)
Sets maximum number of values to list in the double-click menu.
|
void |
setNativeJson(java.lang.String json)
Set additional JSON configuration as a string.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the map whose keys are
DataItem property names to use as pivot table data
and values they localized names. |
void |
setRenderer(Renderer renderer)
Sets the renderer object.
|
void |
setRendererOptions(RendererOptions rendererOptions)
Sets object passed through to renderer as options.
|
void |
setRenderers(Renderers renderers)
Sets the renderers object which defines the collection of renderers to use
in pivot table and additional settings for them.
|
void |
setRowOrder(RowOrder rowOrder)
Sets the order in which row data is provided to the renderer.
|
void |
setRows(java.util.List<java.lang.String> rows)
Sets the list of properties names to use as rows.
|
void |
setShowColTotals(java.lang.Boolean showColTotals)
Set
false if col totals shouldn't be shown and true otherwise. |
void |
setShowRowTotals(java.lang.Boolean showRowTotals)
Set
false if row totals shouldn't be shown and true otherwise. |
void |
setShowUI(java.lang.Boolean showUI)
Hides or shows UI elements in the editable pivot table.
|
void |
setSortersFunction(JsFunction sorters)
Sets the
JsFunction which defines a javascript code
called with an property name and can return a function which can be used
as an argument to Array.sort for output purposes. |
void |
setUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical)
Controls whether or not unused properties are shown vertically
instead of the default which is horizontally.
|
getFrame, setFrame
isEditable, isEditableWithParent, setEditable
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
static final java.lang.String NAME
@Deprecated default com.haulmont.cuba.gui.data.CollectionDatasource getDatasource()
getDataProvider()
instead.@Deprecated default void setDatasource(com.haulmont.cuba.gui.data.CollectionDatasource datasource)
setDataProvider(DataProvider)
instead.ContainerDataProvider
,
EntityDataProvider
,
ListDataProvider
void repaint()
java.util.Map<java.lang.String,java.lang.String> getProperties()
DataItem
property names to use as pivot table data
and values they localized namesvoid setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
DataItem
property names to use as pivot table data
and values they localized names.properties
- a map of properties names with localized valuesvoid addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
DataItem
property names to use as pivot table data
and values they localized names.properties
- a map of properties names with localized valuesvoid addProperty(java.lang.String property, java.lang.String value)
property
- property namevalue
- localized valuejava.util.List<java.lang.String> getRows()
void setRows(java.util.List<java.lang.String> rows)
rows
- a list of properties namesvoid addRows(java.lang.String... rows)
rows
- an array of properties namesjava.util.List<java.lang.String> getColumns()
void setColumns(java.util.List<java.lang.String> cols)
cols
- a list of properties namesvoid addColumns(java.lang.String... cols)
cols
- an array of properties namesAggregation getAggregation()
void setAggregation(Aggregation aggregation)
Applies only when editable=false
.
aggregation
- an aggregation objectRenderer getRenderer()
void setRenderer(Renderer renderer)
Applies only when editable=false
.
renderer
- a renderer objectjava.util.List<java.lang.String> getAggregationProperties()
void setAggregationProperties(java.util.List<java.lang.String> aggregationProperties)
Applies only when editable=true
.
aggregationProperties
- a list of properties namesvoid addAggregationProperties(java.lang.String... aggregationProperties)
Applies only when editable=true
.
aggregationProperties
- an array of properties namesAggregations getAggregations()
void setAggregations(Aggregations aggregations)
Applies only when editable=true
.
aggregations
- an aggregations objectRenderers getRenderers()
void setRenderers(Renderers renderers)
Applies only when editable=true
.
renderers
- a renderers objectjava.util.List<java.lang.String> getHiddenProperties()
void setHiddenProperties(java.util.List<java.lang.String> hiddenProperties)
Applies only when editable=true
.
hiddenProperties
- a list of properties namesvoid addHiddenProperties(java.lang.String... hiddenProperties)
Applies only when editable=true
.
hiddenProperties
- an array of properties namesjava.util.List<java.lang.String> getHiddenFromAggregations()
void setHiddenFromAggregations(java.util.List<java.lang.String> hiddenFromAggregations)
Applies only when editable=true
.
hiddenFromAggregations
- a list of properties namesvoid addHiddenFromAggregations(java.lang.String... hiddenFromAggregations)
Applies only when editable=true
.
hiddenFromAggregations
- an array of properties namesjava.util.List<java.lang.String> getHiddenFromDragDrop()
void setHiddenFromDragDrop(java.util.List<java.lang.String> hiddenFromDragDrop)
Applies only when editable=true
.
hiddenFromDragDrop
- a list of properties namesvoid addHiddenFromDragDrop(java.lang.String... hiddenFromDragDrop)
Applies only when editable=true
.
hiddenFromDragDrop
- an array of properties namesColumnOrder getColumnOrder()
void setColumnOrder(ColumnOrder columnOrder)
Ordering by value orders by column total.
columnOrder
- the order in which column data is provided to the rendererRowOrder getRowOrder()
void setRowOrder(RowOrder rowOrder)
Ordering by value orders by row total.
rowOrder
- the order in which row data is provided to the rendererjava.lang.Integer getMenuLimit()
void setMenuLimit(java.lang.Integer menuLimit)
Applies only when editable=true
.
menuLimit
- maximum number of values to list in the double-click menujava.lang.Boolean getAutoSortUnusedProperties()
true
if unused properties are kept sorted in the UI and false
otherwisevoid setAutoSortUnusedProperties(java.lang.Boolean autoSortUnusedProperties)
Applies only when editable=true
.
autoSortUnusedProperties
- true
if unused properties are
kept sorted in the UI and false
otherwiseUnusedPropertiesVertical getUnusedPropertiesVertical()
true
if unused attributes are shown always vertical,
false
if 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.void setUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical)
true
means
always vertical, false
means 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
.
DataProvider getDataProvider()
void setDataProvider(DataProvider dataProvider)
dataProvider
- a data providervoid addData(DataItem... dataItems)
dataItems
- a data item to addJsFunction getFilterFunction()
JsFunction
which defines a javascript code
called on each record, returns false
if the record is to be
excluded from the input before rendering or true
otherwisevoid setFilterFunction(JsFunction filter)
JsFunction
which defines a javascript code
called on each record, returns false
if the record is to be
excluded from the input before rendering or true
otherwisefilter
- a JsFunction
to use as a filterJsFunction getSortersFunction()
JsFunction
which defines a javascript code
called with an property name and can return a function which can be used
as an argument to Array.sort
for output purposes. If no function
is returned, the default sorting mechanism is a built-in "natural sort"
implementation. Useful for sorting attributes like month namesvoid setSortersFunction(JsFunction sorters)
JsFunction
which defines a javascript code
called with an property name and can return a function which can be used
as an argument to Array.sort
for output purposes. If no function
is returned, the default sorting mechanism is a built-in "natural sort"
implementation. Useful for sorting attributes like month namessorters
- a JsFunction
to use as a sortersRendererOptions getRendererOptions()
void setRendererOptions(RendererOptions rendererOptions)
rendererOptions
- object defines renderer optionsjava.util.Map<java.lang.String,java.util.List<java.lang.String>> getInclusions()
void setInclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> inclusions)
exclusions
).
Applies only when editable=true
.
void setInclusions(java.lang.String property, java.util.List<java.lang.String> inclusions)
property
- property nameinclusions
- a list of properties valuessetInclusions(Map)
,
addInclusions(String, String...)
,
setExclusions(Map)
,
setExclusions(String, List)
,
addExclusions(String, String...)
void addInclusions(java.lang.String property, java.lang.String... inclusions)
property
- a property nameinclusions
- an array of properties valuessetInclusions(Map)
,
setInclusions(String, List)
,
setExclusions(Map)
,
setExclusions(String, List)
,
addExclusions(String, String...)
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExclusions()
void setExclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> exclusions)
Applies only when editable=true
.
void setExclusions(java.lang.String property, java.util.List<java.lang.String> exclusions)
property
- property nameexclusions
- a list of properties valuessetExclusions(Map)
,
addExclusions(String, String...)
,
setInclusions(Map)
,
setInclusions(String, List)
,
addInclusions(String, String...)
void addExclusions(java.lang.String property, java.lang.String... exclusions)
property
- a property nameexclusions
- an array of properties valuessetExclusions(Map)
,
setExclusions(String, List)
,
setInclusions(Map)
,
setInclusions(String, List)
,
addInclusions(String, String...)
DerivedProperties getDerivedProperties()
void setDerivedProperties(DerivedProperties derivedProperties)
derivedProperties
- object to define derived propertiesvoid setNativeJson(java.lang.String json)
java.lang.String getNativeJson()
java.lang.String getEmptyDataMessage()
void setShowUI(java.lang.Boolean showUI)
true
by default.
editable=true
.showUI
- true
if UI elements should be shown and false
otherwisejava.lang.Boolean isShowUI()
true
if pivotUI()
should be shown and false
otherwisevoid setShowRowTotals(java.lang.Boolean showRowTotals)
false
if row totals shouldn't be shown and true
otherwise. Works only for table renderers.
true
by default.showRowTotals
- false
if row totals shouldn't be shown and true
otherwisejava.lang.Boolean isRowTotalsShown()
false
if row totals shouldn't be shown and true
otherwisevoid setShowColTotals(java.lang.Boolean showColTotals)
false
if col totals shouldn't be shown and true
otherwise. Works only for table renderers.
true
by default.showColTotals
- false
if col totals shouldn't be shown and true
otherwisejava.lang.Boolean isColTotalsShown()
false
if col totals shouldn't be shown and true
otherwisevoid setEmptyDataMessage(java.lang.String emptyDataMessage)
emptyDataMessage
- the message that will be displayed in case of empty datacom.haulmont.bali.events.Subscription addRefreshListener(java.util.function.Consumer<PivotTable.RefreshEvent> refreshListener)
refreshListener
- a listener to add@Deprecated void removeRefreshListener(java.util.function.Consumer<PivotTable.RefreshEvent> refreshListener)
Subscription
insteadcom.haulmont.bali.events.Subscription addCellClickListener(java.util.function.Consumer<PivotTable.CellClickEvent> listener)
listener
- a listener to add@Deprecated void removeCellClickListener(java.util.function.Consumer<PivotTable.CellClickEvent> listener)
Subscription
insteadlistener
- a listener to remove