public interface PivotTable extends Component, Component.BelongToFrame, Component.Editable, 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.
|
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| 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).
|
io.jmix.core.common.event.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
|
io.jmix.core.common.event.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() |
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 |
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.
|
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, setFrameisEditable, isEditableWithParent, setEditableaddStyleName, 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, withUnwrappedCompositiongetCaption, setCaptiongetDescription, setDescriptionstatic final java.lang.String NAME
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.
unusedPropertiesVertical - propertiesDataProvider 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.
inclusions - map with properties and values included in renderingsetInclusions(String, List),
addInclusions(String, String...),
setExclusions(Map),
setExclusions(String, List),
addExclusions(String, String...)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.
exclusions - map with properties and values excluded from renderingsetExclusions(String, List),
addExclusions(String, String...),
setInclusions(Map),
setInclusions(String, List),
addInclusions(String, String...)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)
json - additional JSON configurationjava.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 dataio.jmix.core.common.event.Subscription addRefreshListener(java.util.function.Consumer<PivotTable.RefreshEvent> refreshListener)
refreshListener - a listener to addio.jmix.core.common.event.Subscription addCellClickListener(java.util.function.Consumer<PivotTable.CellClickEvent> listener)
listener - a listener to add