Package io.jmix.ui.component
Interface GroupTable<E>
- Type Parameters:
E- row item type
- All Superinterfaces:
ActionsHolder,Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,HasButtonsPanel,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasMinSize,HasPagination,HasSubParts,HasTablePresentations,ListComponent<E>,LookupComponent<E>,Table<E>
- All Known Implementing Classes:
GroupTableImpl
@StudioComponent(caption="GroupTable",
category="Components",
xmlElement="groupTable",
icon="io/jmix/ui/icon/component/groupTable.svg",
canvasBehaviour=TABLE,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/group-table.html")
public interface GroupTable<E>
extends Table<E>
Table UI component that supports grouping of rows by property values.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classObject that contains information about group aggregation distribution.static classClass describes information about group columns for the current row.static interfaceInterface defining method for formatting cell value of group columns.static interfaceGroupTable column.static interfaceAllows to define different styles for table cells.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.LookupComponent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>Nested classes/interfaces inherited from interface io.jmix.ui.component.Table
Table.AggregationDistributionContext<E>, Table.AggregationDistributionProvider<E>, Table.AggregationStyle, Table.Column<E>, Table.ColumnAlignment, Table.ColumnCollapseEvent<E>, Table.ColumnGenerator<E>, Table.ColumnReorderEvent<E>, Table.EmptyStateClickEvent<E>, Table.PlainTextCell, Table.Printable<E,P>, Table.PrintableColumnGenerator<E, P>, Table.RowHeaderMode, Table.SelectionEvent<E>, Table.SortDirection, Table.SortInfo, Table.StyleProvider<E> -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidexpandPath(Object item) Expand all groups for specified item.Returns a map with aggregation results for the given group info instance, where keys are table column ids and values are aggregation value.Returns a copy of currently configured columns in their current visual order in this Table.voidPerforms grouping by the givenproperties.voidgroupByColumns(String... columnIds) Performs grouping by the given ids of table columns.booleanisExpanded(GroupInfo groupId) booleanbooleanbooleanstatic <T> org.springframework.core.ParameterizedTypeReference<GroupTable<T>>voidsetFixedGrouping(boolean fixedGrouping) voidvoidsetShowItemsCountForGroup(boolean showItemsCountForGroup) Show or hide items count for GroupTable groups.voidsetSortOnGroupEnabled(boolean sortOnGroupEnabled) Enable/disable automatic sorting on grouping columns when collection of grouping columns is changed (reorder, add or remove grouping columns)voidungroup()Resets grouping at all.voidungroupByColumns(String... columnIds) Resets grouping by the given ids of table columns.Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActionsMethods inherited from interface io.jmix.ui.component.Component
addStyleName, 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.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasButtonsPanel
getButtonsPanel, setButtonsPanelMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasPagination
getPagination, setPaginationMethods inherited from interface io.jmix.ui.component.HasTablePresentations
applyPresentation, applyPresentationAsDefault, getDefaultPresentationId, getDefaultSettings, getPresentations, loadPresentations, resetPresentation, setDefaultSettingsMethods inherited from interface io.jmix.ui.component.ListComponent
getSelected, getSingleSelected, isMultiSelect, setSelected, setSelectedMethods inherited from interface io.jmix.ui.component.LookupComponent
getLookupSelectedItems, setLookupSelectHandlerMethods inherited from interface io.jmix.ui.component.Table
addColumn, addColumn, addColumn, addColumn, addColumnCollapseListener, addColumnReorderListener, addGeneratedColumn, addGeneratedColumn, addGeneratedColumn, addPrintable, addSelectionListener, addStyleProvider, getAggregationDistributionProvider, getAggregationResults, getAggregationStyle, getColumn, getColumnControlVisible, getColumnReorderingAllowed, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterPressAction, getInstanceContainer, getItemClickAction, getItemDescriptionProvider, getItems, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getNotCollapsedColumns, getPrintable, getPrintable, getRowHeaderWidth, getSortInfo, getSubPart, isAggregatable, isColumnHeaderVisible, isContextMenuEnabled, isMultiLineCells, isShowSelection, isShowTotalAggregation, isSortable, isTextSelectionEnabled, removeColumn, removeGeneratedColumn, removePrintable, removeStyleProvider, repaint, requestFocus, scrollTo, selectAll, setAggregatable, setAggregationDistributionProvider, setAggregationStyle, setColumnControlVisible, setColumnHeaderVisible, setColumnReorderingAllowed, setContextMenuEnabled, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setIconProvider, setItemClickAction, setItemDescriptionProvider, setItems, setMinHeight, setMinWidth, setMultiLineCells, setMultiSelect, setRequired, setRowHeaderMode, setRowHeaderWidth, setShowSelection, setShowTotalAggregation, setSortable, setStyleProvider, setTextSelectionEnabled, showCustomPopup, showCustomPopupActions, sort
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
of
static <T> org.springframework.core.ParameterizedTypeReference<GroupTable<T>> of(Class<T> itemClass) -
getColumns
@StudioElementsGroup(xmlElement="group", caption="Group", icon="io/jmix/ui/icon/element/group.svg", elementXmlName="column") List<Table.Column<E>> getColumns()Description copied from interface:TableReturns a copy of currently configured columns in their current visual order in this Table.- Specified by:
getColumnsin interfaceTable<E>- Returns:
- unmodifiable copy of current columns
- See Also:
-
groupBy
Performs grouping by the givenproperties.- Parameters:
properties- an array ofMetaPropertyPath
-
groupByColumns
Performs grouping by the given ids of table columns.- Parameters:
columnIds- column ids
-
ungroupByColumns
Resets grouping by the given ids of table columns.- Parameters:
columnIds- column ids
-
ungroup
void ungroup()Resets grouping at all. -
getGroupCellValueFormatter
GroupTable.GroupCellValueFormatter<E> getGroupCellValueFormatter() -
setGroupCellValueFormatter
-
expandAll
void expandAll() -
expand
-
expandPath
Expand all groups for specified item. -
collapseAll
void collapseAll() -
collapse
-
isExpanded
-
isFixedGrouping
boolean isFixedGrouping() -
setFixedGrouping
-
isShowItemsCountForGroup
boolean isShowItemsCountForGroup()- Returns:
- true if GroupTable shows items count for group
-
setShowItemsCountForGroup
void setShowItemsCountForGroup(boolean showItemsCountForGroup) Show or hide items count for GroupTable groups.
Default value is true. -
getAggregationResults
Returns a map with aggregation results for the given group info instance, where keys are table column ids and values are aggregation value.- Parameters:
info- the group info instance- Returns:
- aggregation results for the given group info instance
-
isSortOnGroupEnabled
boolean isSortOnGroupEnabled()- Returns:
- true if automatic sorting on grouping columns is enabled
- See Also:
-
setSortOnGroupEnabled
Enable/disable automatic sorting on grouping columns when collection of grouping columns is changed (reorder, add or remove grouping columns)- Parameters:
sortOnGroupEnabled- flag whether sorting should be performed when grouping columns are changed.
-