public class GroupTableImpl<E> extends AbstractTable<JmixGroupTable,E> implements GroupTable<E>
| Modifier and Type | Class and Description |
|---|---|
protected class |
GroupTableImpl.AggregatableGroupTableDataContainer<I> |
protected static class |
GroupTableImpl.GroupAggregationCells |
protected static class |
GroupTableImpl.GroupColumnImpl<E> |
protected class |
GroupTableImpl.JmixGroupTableExt |
AbstractTable.AggregatableSortableDataContainer<I>, AbstractTable.AggregatableTableDataContainer<I>, AbstractTable.ColumnImpl<E>, AbstractTable.InstalledStyleProvider, AbstractTable.ItemDescriptionGenerator, AbstractTable.StyleGeneratorAdapterGroupTable.GroupAggregationDistributionContext<V>, GroupTable.GroupCellContext<E>, GroupTable.GroupCellValueFormatter<E>, GroupTable.GroupColumn<E>, GroupTable.GroupStyleProvider<E>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>Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperHasContextHelp.ContextHelpIconClickEventLookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<Table.Column,GroupTableImpl.GroupAggregationCells> |
groupAggregationCells |
protected GroupTable.GroupCellValueFormatter<E> |
groupCellValueFormatter |
protected boolean |
rerender |
protected boolean |
showItemsCountForGroup |
accessManager, actions, aggregatableDelegate, aggregationCells, aggregations, BOOLEAN_CELL_STYLE_FALSE, BOOLEAN_CELL_STYLE_TRUE, buttonsPanel, columnCollapseListener, columns, columnsOrder, componentComposition, componentProperties, CUSTOM_STYLE_NAME_PREFIX, dataBinding, dataComponents, datatypeRegistry, defaultTableSettings, distributionProvider, EDIT_ACTION_ID, editable, emptyStateClickLinkHandler, enterPressAction, entityStates, fieldDatasources, HAS_TOP_PANEL_STYLENAME, iconProvider, iconResolver, ignoreUnfetchedAttributes, internalStyles, itemClickAction, itemDescriptionProvider, locale, MAX_TEXT_LENGTH_GAP, messages, messageTools, metadata, metadataTools, pagination, presentations, printables, requiredColumns, ROW_HEADER_PROPERTY_ID, settingsRegistry, sortable, styleProviders, topPanel, uiComponentsGenerator, uiTestIdsSupport, userSettingsTools, VALUE_PROVIDER_GENERATOR, VIEW_ACTION_ID, viewRepository, VOID_COLUMN_GENERATORactionButtons, actionList, actionPropertyChangeListener, actionsPermissions, contextMenuPopup, shortcutsDelegate, showIconsForPopupMenuActionsalignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentNAMEAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Constructor and Description |
|---|
GroupTableImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.Object,java.lang.Object> |
__handleAggregationResults(AggregationContainer.Context context,
java.util.Map<java.lang.Object,java.lang.Object> results) |
void |
collapse(GroupInfo groupId) |
void |
collapseAll() |
protected void |
collectItemIds(GroupInfo groupId,
java.util.List<java.lang.Object> itemIds) |
protected java.util.List<java.lang.Object> |
collectPropertiesByColumns(java.lang.String... columnIds) |
protected AbstractTable.ColumnImpl<E> |
createColumn(java.lang.Object id,
AbstractTable<?,E> owner) |
protected JmixGroupTable |
createComponent() |
protected TableDataContainer<E> |
createTableDataContainer(TableItems<E> tableItems) |
protected boolean |
distributeGroupAggregation(JmixEnhancedTable.AggregationInputValueChangeContext context) |
void |
expand(GroupInfo groupId) |
void |
expandAll() |
protected void |
expandGroupsFor(java.util.Collection<GroupInfo> groupSlice,
java.lang.Object itemId) |
void |
expandPath(java.lang.Object item)
Expand all groups for specified item.
|
protected java.lang.String |
formatAggregatableGroupPropertyValue(GroupInfo<io.jmix.core.metamodel.model.MetaPropertyPath> groupId,
java.lang.Object value) |
protected java.lang.String |
formatGroupPropertyValue(GroupInfo<io.jmix.core.metamodel.model.MetaPropertyPath> groupId,
java.lang.Object value) |
java.util.Map<java.lang.Object,java.lang.Object> |
getAggregationResults(GroupInfo info)
Returns a map with aggregation results for the given group info instance,
where keys are table column ids and values are aggregation value.
|
protected java.util.List<java.lang.Object> |
getAllItemIds(GroupTableItems<E> tableSource) |
protected Table.Column |
getColumnNN(java.lang.String columnId) |
protected java.lang.String |
getGeneratedCellStyle(java.lang.Object itemId,
java.lang.Object propertyId) |
GroupTable.GroupCellValueFormatter<E> |
getGroupCellValueFormatter() |
protected java.lang.Object[] |
getNewColumnOrder(java.lang.Object[] newGroupProperties) |
protected ComponentSettingsBinder |
getSettingsBinder() |
void |
groupBy(java.lang.Object[] properties)
Performs grouping by the given
properties. |
void |
groupByColumns(java.lang.String... columnIds)
Performs grouping by the given ids of table columns.
|
protected void |
initComponent(JmixGroupTable component) |
boolean |
isExpanded(GroupInfo groupId) |
boolean |
isFixedGrouping() |
boolean |
isShowItemsCountForGroup() |
void |
selectAll()
Marks all the items in the current data source as selected.
|
void |
setAggregationDistributionProvider(Table.AggregationDistributionProvider<E> distributionProvider)
Sets aggregation distribution provider to handle distribution of data on rows.
|
void |
setFixedGrouping(boolean fixedGrouping) |
void |
setGroupCellValueFormatter(GroupTable.GroupCellValueFormatter<E> formatter) |
void |
setItems(TableItems<E> tableItems)
Sets an instance of
TableItems as the Table data source. |
void |
setShowItemsCountForGroup(boolean showItemsCountForGroup)
Show or hide items count for GroupTable groups.
|
void |
ungroup()
Resets grouping at all.
|
void |
ungroupByColumns(java.lang.String... columnIds)
Resets grouping by the given ids of table columns.
|
protected boolean |
uselessGrouping(java.lang.Object[] newGroupProperties) |
protected void |
validateProperties(java.lang.Object[] properties) |
__aggregate, __aggregateValues, addAggregationCell, addColumn, addColumn, addColumn, addColumn, addColumnCollapseListener, addColumnInternal, addColumnReorderListener, addGeneratedColumn, addGeneratedColumn, addGeneratedColumn, addGeneratedColumnInternal, addLookupValueChangeListener, addPrintable, addSelectionListener, addStyleProvider, afterPropertiesSet, applyPresentation, applyPresentation, applyPresentationAsDefault, applyPresentationSettings, attachAction, attached, beforeComponentPaint, beforeContextMenuButtonHandlerPerformed, canBeSorted, checkAggregation, clearFieldDatasources, convertAggregationKeyMapToColumnIdKeyMap, createColumns, createContextMenuButton, createFieldFactory, createInstallHandler, createLinkCellClickListener, createStubsForGeneratedColumns, createStyleGenerator, createTablePresentations, createTablePresentationsLayout, createTopPanel, detached, disableEditableColumns, distributeAggregation, enableEditableColumns, fireSelectionEvent, focus, formatCellValue, generateCellDescription, generateCellStyle, generateClickableCellStyles, generateDefaultCellStyle, getAggregatableDelegate, getAggregationDistributionProvider, getAggregationInfos, getAggregationResults, getAggregationStyle, getAutowiredProperties, getButtonsPanel, getCaption, getColumn, getColumnCaption, getColumnCaption, getColumnControlVisible, getColumnReorderingAllowed, getColumns, getColumnsInternal, getColumnsOrderInternal, getColumnType, getComposition, getDefaultPresentationId, getDefaultSettings, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterAction, getEnterPressAction, getFormattedValue, getInitialVisibleColumnIds, getInnerComponents, getInstanceContainer, getItemClickAction, getItemDescriptionProvider, getItemIcon, getItems, getLookupSelectedItems, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getNotCollapsedColumns, getPagination, getParsedAggregationValue, getPresentations, getPrintable, getPrintable, getPropertyColumns, getRequiredColumnsInternal, getRowHeaderWidth, getSelected, getSelectedItemIds, getSettingsFromPresentation, getSingleSelected, getSortInfo, getStyleName, getTabIndex, getValueExIgnoreUnfetched, handleAggregation, handleClickAction, handleColumnCollapsed, handlePresentationVariables, handleSpecificVariables, initEmptyState, internalRemoveColumnCollapseListener, isAggregatable, isCaptionAsHtml, isColumnHeaderVisible, isContextMenuEnabled, isEditable, isMultiLineCells, isMultiSelect, isSettingsAvailable, isShowSelection, isShowTotalAggregation, isSortable, isTextSelectionEnabled, isValueGeneratedColumn, loadPresentations, needUpdatePresentation, onAfterUnregisterComponent, onBeforeRefreshRowCache, onColumnCollapseStateChange, onColumnReorder, refreshActionsState, removeAggregationCell, removeAllClickListeners, removeColumn, removeGeneratedColumn, removeGeneratedColumnInternal, removePrintable, removeStyleProvider, repaint, requestFocus, resetPresentation, scrollTo, setAccessManager, setActions, setAggregatable, setAggregations, setAggregationStyle, setButtonsPanel, setCaption, setCaptionAsHtml, setClientCaching, setColumnAggregationDescriptionByType, setColumnControlVisible, setColumnHeader, setColumnHeaderVisible, setColumnReorderingAllowed, setContextMenuEnabled, setCurrentAuthentication, setDataComponents, setDatatypeRegistry, setDebugId, setDefaultSettings, setEditable, setEditableColumns, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setEntityStates, setIconProvider, setIconResolver, setId, setItemClickAction, setItemDescriptionProvider, setLookupSelectHandler, setMessages, setMessageTools, setMetadata, setMetadataTools, setMinHeight, setMinWidth, setMultiLineCells, setMultiSelect, setPagination, setRequired, setRowHeaderMode, setRowHeaderWidth, setSelected, setSelected, setSelectedIds, setSettingsRegistry, setShowSelection, setShowTotalAggregation, setSortable, setStyleName, setStyleProvider, setTabIndex, setTablePresentationsLayout, setTextSelectionEnabled, setUiComponentProperties, setUiComponentsGenerator, setUiTestId, setUiTestIdsSupport, setupAutowiredColumns, setupColumnSettings, setupPaginationDataSourceProvider, setUserSettingsTools, setViewRepository, setVisibleColumns, showCustomPopup, showCustomPopupActions, showEmptyStateIfPossible, showParseErrorNotification, sort, tableSelectionChanged, tableSourceItemSetChanged, tableSourcePropertyValueChanged, tableSourceSelectedItemChanged, tableSourceStateChanged, updateCompositionStylesTopPanelVisible, updatePresentationSettingsactionPropertyChanged, addAction, addAction, createContextMenuPopup, createShortcutsDelegate, getAction, getActions, getActionsPermissions, initContextMenuButton, initContextMenuPopup, removeAction, removeAction, removeAllActions, setContextMenuButtonAction, setContextMenuButtonCaption, setContextMenuButtonIcon, setThemeConstantsManageraddAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setParent, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumns, ofaddColumn, 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, setAggregatable, setAggregationStyle, setColumnControlVisible, setColumnHeaderVisible, setColumnReorderingAllowed, setContextMenuEnabled, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setIconProvider, setItemClickAction, setItemDescriptionProvider, setMinHeight, setMinWidth, setMultiLineCells, setMultiSelect, setRequired, setRowHeaderMode, setRowHeaderWidth, setShowSelection, setShowTotalAggregation, setSortable, setStyleProvider, setTextSelectionEnabled, showCustomPopup, showCustomPopupActions, sortgetSelected, getSingleSelected, isMultiSelect, setSelected, setSelectedgetFrame, setFrameaddAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActionsaddStyleName, 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, withUnwrappedCompositionisEditable, isEditableWithParent, setEditablegetButtonsPanel, setButtonsPanelapplyPresentation, applyPresentationAsDefault, getDefaultPresentationId, getDefaultSettings, getPresentations, loadPresentations, resetPresentation, setDefaultSettingsgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledgetIcon, setIcon, setIconFromSetgetLookupSelectedItems, setLookupSelectHandlerfocus, getTabIndex, isFocusable, setFocusable, setTabIndexisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledgetPagination, setPaginationprotected java.util.Map<Table.Column,GroupTableImpl.GroupAggregationCells> groupAggregationCells
protected boolean rerender
protected boolean showItemsCountForGroup
protected GroupTable.GroupCellValueFormatter<E> groupCellValueFormatter
public void setItems(@Nullable
TableItems<E> tableItems)
TableTableItems as the Table data source.setItems in interface Table<E>setItems in class AbstractTable<JmixGroupTable,E>tableItems - the Table data sourceprotected TableDataContainer<E> createTableDataContainer(TableItems<E> tableItems)
createTableDataContainer in class AbstractTable<JmixGroupTable,E>protected void initComponent(JmixGroupTable component)
initComponent in class AbstractTable<JmixGroupTable,E>protected JmixGroupTable createComponent()
protected ComponentSettingsBinder getSettingsBinder()
getSettingsBinder in class AbstractTable<JmixGroupTable,E>protected java.util.Map<java.lang.Object,java.lang.Object> __handleAggregationResults(AggregationContainer.Context context, java.util.Map<java.lang.Object,java.lang.Object> results)
__handleAggregationResults in class AbstractTable<JmixGroupTable,E>protected java.lang.Object[] getNewColumnOrder(java.lang.Object[] newGroupProperties)
protected java.util.List<java.lang.Object> collectPropertiesByColumns(java.lang.String... columnIds)
protected void validateProperties(java.lang.Object[] properties)
public void groupBy(java.lang.Object[] properties)
GroupTableproperties.groupBy in interface GroupTable<E>properties - an array of MetaPropertyPathpublic void groupByColumns(java.lang.String... columnIds)
GroupTablegroupByColumns in interface GroupTable<E>columnIds - column idspublic void ungroupByColumns(java.lang.String... columnIds)
GroupTableungroupByColumns in interface GroupTable<E>columnIds - column idspublic void ungroup()
GroupTableungroup in interface GroupTable<E>protected boolean uselessGrouping(@Nullable
java.lang.Object[] newGroupProperties)
protected Table.Column getColumnNN(java.lang.String columnId)
public GroupTable.GroupCellValueFormatter<E> getGroupCellValueFormatter()
getGroupCellValueFormatter in interface GroupTable<E>public void setGroupCellValueFormatter(GroupTable.GroupCellValueFormatter<E> formatter)
setGroupCellValueFormatter in interface GroupTable<E>public void expandAll()
expandAll in interface GroupTable<E>public void expand(GroupInfo groupId)
expand in interface GroupTable<E>public void expandPath(java.lang.Object item)
GroupTableexpandPath in interface GroupTable<E>protected void expandGroupsFor(java.util.Collection<GroupInfo> groupSlice, java.lang.Object itemId)
public void collapseAll()
collapseAll in interface GroupTable<E>public void collapse(GroupInfo groupId)
collapse in interface GroupTable<E>public boolean isExpanded(GroupInfo groupId)
isExpanded in interface GroupTable<E>public boolean isFixedGrouping()
isFixedGrouping in interface GroupTable<E>public void setFixedGrouping(boolean fixedGrouping)
setFixedGrouping in interface GroupTable<E>public boolean isShowItemsCountForGroup()
isShowItemsCountForGroup in interface GroupTable<E>public void setShowItemsCountForGroup(boolean showItemsCountForGroup)
GroupTablesetShowItemsCountForGroup in interface GroupTable<E>@Nullable
protected java.lang.String getGeneratedCellStyle(java.lang.Object itemId,
@Nullable
java.lang.Object propertyId)
getGeneratedCellStyle in class AbstractTable<JmixGroupTable,E>public java.util.Map<java.lang.Object,java.lang.Object> getAggregationResults(GroupInfo info)
GroupTablegetAggregationResults in interface GroupTable<E>info - the group info instancepublic void selectAll()
TableselectAll in interface Table<E>selectAll in class AbstractTable<JmixGroupTable,E>protected java.util.List<java.lang.Object> getAllItemIds(GroupTableItems<E> tableSource)
protected void collectItemIds(GroupInfo groupId, java.util.List<java.lang.Object> itemIds)
public void setAggregationDistributionProvider(@Nullable
Table.AggregationDistributionProvider<E> distributionProvider)
TablesetAggregationDistributionProvider in interface Table<E>setAggregationDistributionProvider in class AbstractTable<JmixGroupTable,E>distributionProvider - distribution providerprotected boolean distributeGroupAggregation(JmixEnhancedTable.AggregationInputValueChangeContext context)
protected java.lang.String formatAggregatableGroupPropertyValue(GroupInfo<io.jmix.core.metamodel.model.MetaPropertyPath> groupId, @Nullable java.lang.Object value)
@Nullable protected java.lang.String formatGroupPropertyValue(GroupInfo<io.jmix.core.metamodel.model.MetaPropertyPath> groupId, @Nullable java.lang.Object value)
protected AbstractTable.ColumnImpl<E> createColumn(java.lang.Object id, AbstractTable<?,E> owner)
createColumn in class AbstractTable<JmixGroupTable,E>