public abstract class AbstractTable<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable,E> extends AbstractActionsHolderComponent<T> implements Table<E>, TableItemsEventsDelegate<E>, LookupComponent.LookupSelectionChangeNotifier<E>, HasInnerComponents, InstallTargetHandler, org.springframework.beans.factory.InitializingBean
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractTable.AggregatableSortableDataContainer<I> |
protected class |
AbstractTable.AggregatableTableDataContainer<I> |
static class |
AbstractTable.ColumnImpl<E> |
protected static class |
AbstractTable.InstalledStyleProvider |
protected class |
AbstractTable.ItemDescriptionGenerator |
protected class |
AbstractTable.StyleGeneratorAdapter |
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.Wrapper
HasContextHelp.ContextHelpIconClickEvent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>
Modifier and Type | Field and Description |
---|---|
protected io.jmix.core.AccessManager |
accessManager |
protected Actions |
actions |
protected AggregatableDelegate<java.lang.Object> |
aggregatableDelegate |
protected java.util.Map<Table.Column,java.lang.String> |
aggregationCells |
protected Aggregations |
aggregations |
static java.lang.String |
BOOLEAN_CELL_STYLE_FALSE |
static java.lang.String |
BOOLEAN_CELL_STYLE_TRUE |
protected ButtonsPanel |
buttonsPanel |
protected com.vaadin.v7.ui.Table.ColumnCollapseListener |
columnCollapseListener |
protected java.util.Map<java.lang.Object,Table.Column<E>> |
columns |
protected java.util.List<Table.Column<E>> |
columnsOrder |
protected TableComposition |
componentComposition |
protected UiComponentProperties |
componentProperties |
protected static java.lang.String |
CUSTOM_STYLE_NAME_PREFIX |
protected TableDataContainer<E> |
dataBinding |
protected DataComponents |
dataComponents |
protected io.jmix.core.metamodel.datatype.DatatypeRegistry |
datatypeRegistry |
protected TableSettings |
defaultTableSettings |
protected Table.AggregationDistributionProvider<E> |
distributionProvider |
protected static java.lang.String |
EDIT_ACTION_ID |
protected boolean |
editable |
protected java.util.function.Consumer<Table.EmptyStateClickEvent<E>> |
emptyStateClickLinkHandler |
protected Action |
enterPressAction |
protected io.jmix.core.EntityStates |
entityStates |
protected java.util.Map<java.lang.Object,java.lang.Object> |
fieldDatasources |
protected static java.lang.String |
HAS_TOP_PANEL_STYLENAME |
protected java.util.function.Function<? super E,java.lang.String> |
iconProvider |
protected IconResolver |
iconResolver |
protected boolean |
ignoreUnfetchedAttributes |
protected java.util.List<java.lang.String> |
internalStyles |
protected Action |
itemClickAction |
protected java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> |
itemDescriptionProvider |
protected java.util.Locale |
locale |
static int |
MAX_TEXT_LENGTH_GAP |
protected io.jmix.core.Messages |
messages |
protected io.jmix.core.MessageTools |
messageTools |
protected io.jmix.core.Metadata |
metadata |
protected io.jmix.core.MetadataTools |
metadataTools |
protected PaginationComponent |
pagination |
protected TablePresentations |
presentations |
protected java.util.Map<java.lang.String,Table.Printable> |
printables |
protected java.util.Map<Table.Column,java.lang.String> |
requiredColumns |
protected static java.lang.Object |
ROW_HEADER_PROPERTY_ID |
protected ComponentSettingsRegistry |
settingsRegistry |
protected boolean |
sortable |
protected java.util.List<Table.StyleProvider> |
styleProviders |
protected com.vaadin.ui.CssLayout |
topPanel |
protected UiComponentsGenerator |
uiComponentsGenerator |
protected UiTestIdsSupport |
uiTestIdsSupport |
protected UserSettingsTools |
userSettingsTools |
protected com.vaadin.v7.ui.Table.ColumnGenerator |
VALUE_PROVIDER_GENERATOR |
protected static java.lang.String |
VIEW_ACTION_ID |
protected io.jmix.core.FetchPlanRepository |
viewRepository |
protected static com.vaadin.v7.ui.Table.ColumnGenerator |
VOID_COLUMN_GENERATOR |
actionButtons, actionList, actionPropertyChangeListener, actionsPermissions, contextMenuPopup, shortcutsDelegate, showIconsForPopupMenuActions
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier | Constructor and Description |
---|---|
protected |
AbstractTable() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.Object,java.lang.Object> |
__aggregate(AggregationContainer container,
AggregationContainer.Context context) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
__aggregateValues(AggregationContainer container,
AggregationContainer.Context context) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
__handleAggregationResults(AggregationContainer.Context context,
java.util.Map<java.lang.Object,java.lang.Object> results) |
protected void |
addAggregationCell(Table.Column column) |
Table.Column<E> |
addColumn(java.lang.Object id)
Creates new column with given Id, then adds this column to Table.
|
Table.Column<E> |
addColumn(java.lang.Object id,
int index)
Creates new column with given Id at the specified index, then adds this column to Table.
|
void |
addColumn(Table.Column<E> column)
Adds the given column to Table.
|
void |
addColumn(Table.Column<E> column,
int index)
Adds the given column at the specified index to Table.
|
io.jmix.core.common.event.Subscription |
addColumnCollapseListener(java.util.function.Consumer<Table.ColumnCollapseEvent<E>> listener)
Adds a listener for column collapse events.
|
protected void |
addColumnInternal(Table.Column<E> column,
int index) |
io.jmix.core.common.event.Subscription |
addColumnReorderListener(java.util.function.Consumer<Table.ColumnReorderEvent<E>> listener)
Registers a new column reorder listener.
|
void |
addGeneratedColumn(java.lang.String columnId,
int index,
Table.ColumnGenerator<? super E> generator)
Adds a generated column at the specified index to Table.
|
void |
addGeneratedColumn(java.lang.String columnId,
Table.ColumnGenerator<? super E> generator)
Adds a generated column to the table.
|
void |
addGeneratedColumn(java.lang.String columnId,
Table.ColumnGenerator<? super E> generator,
java.lang.Class<? extends Component> componentClass)
Adds a generated column to the table.
|
protected void |
addGeneratedColumnInternal(java.lang.Object id,
com.vaadin.v7.ui.Table.ColumnGenerator generator) |
io.jmix.core.common.event.Subscription |
addLookupValueChangeListener(java.util.function.Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener)
Adds a listener that invoked when lookup selected items set is changed.
|
void |
addPrintable(java.lang.String columnId,
Table.Printable<? super E,?> printable)
Adds
Table.Printable representation for column. |
io.jmix.core.common.event.Subscription |
addSelectionListener(java.util.function.Consumer<Table.SelectionEvent<E>> listener)
Registers a new selection listener
|
void |
addStyleProvider(Table.StyleProvider<? super E> styleProvider)
Add style provider for the table.
Table can use several providers to obtain many style names for cells and rows. |
void |
afterPropertiesSet() |
void |
applyPresentation(java.lang.Object id) |
protected void |
applyPresentation(TablePresentation p) |
void |
applyPresentationAsDefault(java.lang.Object id) |
protected void |
applyPresentationSettings(TablePresentation p) |
protected void |
attachAction(Action action) |
protected void |
beforeComponentPaint() |
protected void |
beforeContextMenuButtonHandlerPerformed() |
protected boolean |
canBeSorted(TableItems<E> tableItems) |
protected void |
checkAggregation(AggregationInfo aggregationInfo) |
protected void |
clearFieldDatasources() |
protected java.util.Map<java.lang.Object,java.lang.Object> |
convertAggregationKeyMapToColumnIdKeyMap(AggregationContainer container,
java.util.Map<AggregationInfo,?> aggregationInfoMap) |
protected AbstractTable.ColumnImpl<E> |
createColumn(java.lang.Object id,
AbstractTable<?,E> owner) |
protected void |
createColumns(com.vaadin.v7.data.Container ds) |
protected JmixButton |
createContextMenuButton() |
protected TableFieldFactoryImpl |
createFieldFactory() |
java.lang.Object |
createInstallHandler(java.lang.Class<?> targetObjectType,
FrameOwner frameOwner,
java.lang.reflect.Method method) |
protected java.util.function.Consumer<Table.Column.ClickEvent> |
createLinkCellClickListener() |
protected void |
createStubsForGeneratedColumns() |
protected AbstractTable.StyleGeneratorAdapter |
createStyleGenerator() |
protected TableDataContainer<E> |
createTableDataContainer(TableItems<E> tableItems) |
protected TablePresentations |
createTablePresentations() |
protected TablePresentationsLayout |
createTablePresentationsLayout() |
protected com.vaadin.ui.CssLayout |
createTopPanel() |
protected void |
disableEditableColumns(EntityTableItems<E> entityTableSource,
java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> propertyIds) |
protected boolean |
distributeAggregation(JmixEnhancedTable.AggregationInputValueChangeContext context) |
protected void |
enableEditableColumns(EntityTableItems<E> entityTableSource,
java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> propertyIds) |
protected void |
fireSelectionEvent(com.vaadin.v7.data.Property.ValueChangeEvent e) |
void |
focus()
Sets focus to this component
|
protected java.lang.String |
formatCellValue(java.lang.Object rowId,
java.lang.Object colId,
com.vaadin.v7.data.Property<?> property) |
protected java.lang.String |
generateCellDescription(java.lang.Object itemId,
java.lang.Object propertyId) |
protected java.lang.String |
generateCellStyle(java.lang.Object itemId,
java.lang.Object propertyId) |
protected java.lang.String |
generateClickableCellStyles(java.lang.Object itemId,
Table.Column column,
io.jmix.core.metamodel.model.MetaPropertyPath propertyPath) |
protected java.lang.String |
generateDefaultCellStyle(java.lang.Object itemId,
java.lang.Object propertyId,
io.jmix.core.metamodel.model.MetaPropertyPath propertyPath) |
protected AggregatableDelegate<java.lang.Object> |
getAggregatableDelegate() |
Table.AggregationDistributionProvider<E> |
getAggregationDistributionProvider() |
protected java.util.List<AggregationInfo> |
getAggregationInfos(AggregationContainer container) |
java.util.Map<java.lang.Object,java.lang.Object> |
getAggregationResults()
Returns a map with aggregation results, where keys are table column ids and values are aggregation values.
|
Table.AggregationStyle |
getAggregationStyle() |
protected java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> |
getAutowiredProperties(EntityTableItems<E> entityTableSource) |
ButtonsPanel |
getButtonsPanel() |
java.lang.String |
getCaption() |
Table.Column<E> |
getColumn(java.lang.String id)
Returns a column by id.
|
protected java.lang.String |
getColumnCaption(java.lang.Object columnId) |
protected java.lang.String |
getColumnCaption(java.lang.Object columnId,
Table.Column column) |
boolean |
getColumnControlVisible() |
boolean |
getColumnReorderingAllowed()
Returns whether column reordering is allowed.
|
java.util.List<Table.Column<E>> |
getColumns()
Returns a copy of currently configured columns in their current visual
order in this Table.
|
java.util.Map<java.lang.Object,Table.Column<E>> |
getColumnsInternal() |
protected java.util.List<Table.Column<E>> |
getColumnsOrderInternal() |
protected java.lang.Class |
getColumnType(Table.Column<E> column) |
com.vaadin.ui.Component |
getComposition() |
java.lang.Object |
getDefaultPresentationId() |
ComponentSettings |
getDefaultSettings() |
java.util.function.Consumer<Table.EmptyStateClickEvent<E>> |
getEmptyStateLinkClickHandler() |
java.lang.String |
getEmptyStateLinkMessage() |
java.lang.String |
getEmptyStateMessage() |
protected Action |
getEnterAction() |
Action |
getEnterPressAction() |
protected java.lang.String |
getFormattedValue(Table.Column<E> column,
java.lang.Object value) |
protected java.lang.String |
getGeneratedCellStyle(java.lang.Object itemId,
java.lang.Object propertyId) |
protected java.util.List<java.lang.Object> |
getInitialVisibleColumnIds(EntityTableItems<E> entityTableSource) |
java.util.Collection<Component> |
getInnerComponents() |
InstanceContainer<E> |
getInstanceContainer(E item)
This method returns the InstanceContainer which contains the provided item.
|
Action |
getItemClickAction() |
java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> |
getItemDescriptionProvider()
Gets the item description provider.
|
protected com.vaadin.server.Resource |
getItemIcon(java.lang.Object itemId) |
TableItems<E> |
getItems() |
java.util.Collection<E> |
getLookupSelectedItems() |
java.util.List<Table.Column> |
getNotCollapsedColumns() |
PaginationComponent |
getPagination() |
protected java.lang.Object |
getParsedAggregationValue(java.lang.String value,
java.lang.Object columnId) |
TablePresentations |
getPresentations() |
Table.Printable |
getPrintable(java.lang.String columnId)
Gets
Table.Printable representation for column. |
Table.Printable |
getPrintable(Table.Column column)
Gets
Table.Printable representation for column. |
protected java.util.List<java.lang.Object> |
getPropertyColumns(EntityTableItems<E> entityTableSource,
java.util.List<Table.Column<E>> columnsOrder) |
java.util.Map<Table.Column,java.lang.String> |
getRequiredColumnsInternal() |
int |
getRowHeaderWidth() |
java.util.Set<E> |
getSelected()
Returns a set of entity instances corresponding to the selected rows of the list component.
|
protected java.util.Set<java.lang.Object> |
getSelectedItemIds() |
protected ComponentSettingsBinder |
getSettingsBinder() |
protected ComponentSettings |
getSettingsFromPresentation(TablePresentation p) |
E |
getSingleSelected()
Returns an instance of entity corresponding to the selected row of the list component.
|
Table.SortInfo |
getSortInfo() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
protected java.lang.Object |
getValueExIgnoreUnfetched(java.lang.Object instance,
java.lang.String[] properties) |
protected void |
handleAggregation() |
protected void |
handleClickAction() |
protected void |
handleColumnCollapsed(com.vaadin.v7.ui.Table.ColumnCollapseEvent event) |
protected void |
handlePresentationVariables(java.util.Map<java.lang.String,java.lang.Object> variables) |
protected boolean |
handleSpecificVariables(java.util.Map<java.lang.String,java.lang.Object> variables) |
protected void |
initComponent(T component) |
protected void |
initEmptyState() |
protected void |
internalRemoveColumnCollapseListener(java.util.function.Consumer<Table.ColumnCollapseEvent<E>> listener) |
boolean |
isAggregatable() |
boolean |
isCaptionAsHtml() |
boolean |
isColumnHeaderVisible() |
boolean |
isContextMenuEnabled() |
boolean |
isEditable() |
boolean |
isMultiLineCells() |
boolean |
isMultiSelect() |
protected boolean |
isSettingsAvailable() |
boolean |
isShowSelection() |
boolean |
isShowTotalAggregation() |
boolean |
isSortable() |
boolean |
isTextSelectionEnabled() |
protected boolean |
isValueGeneratedColumn(java.lang.Object propertyId) |
void |
loadPresentations() |
protected boolean |
needUpdatePresentation(java.util.Map<java.lang.String,java.lang.Object> variables) |
protected void |
onAfterUnregisterComponent(com.vaadin.ui.Component component) |
protected void |
onBeforeRefreshRowCache() |
protected void |
onColumnCollapseStateChange(com.vaadin.v7.ui.Table.ColumnCollapseEvent e) |
protected void |
onColumnReorder(com.vaadin.v7.ui.Table.ColumnReorderEvent e) |
protected void |
refreshActionsState() |
protected void |
removeAggregationCell(Table.Column column) |
protected void |
removeAllClickListeners() |
void |
removeColumn(Table.Column column)
Removes the given column from Table or do nothing if column is
null . |
void |
removeGeneratedColumn(java.lang.String columnId)
Removes generated column from the Table by column id.
|
protected void |
removeGeneratedColumnInternal(java.lang.Object id) |
void |
removePrintable(java.lang.String columnId)
Removes
Table.Printable representation of column. |
void |
removeStyleProvider(Table.StyleProvider<? super E> styleProvider)
Removes style provider for the table.
|
void |
repaint()
Repaints UI representation of the table (columns, generated columns) without refreshing the table data.
|
void |
requestFocus(E item,
java.lang.String columnId)
Sets focus on inner field of editable/generated column.
|
void |
resetPresentation() |
void |
scrollTo(E item)
Scrolls table to specified row.
|
void |
selectAll()
Marks all the items in the current data source as selected.
|
void |
setAccessManager(io.jmix.core.AccessManager accessManager) |
void |
setActions(Actions actions) |
void |
setAggregatable(boolean aggregatable)
Sets whether aggregation is enabled.
|
void |
setAggregationDistributionProvider(Table.AggregationDistributionProvider<E> distributionProvider)
Sets aggregation distribution provider to handle distribution of data on rows.
|
void |
setAggregations(Aggregations aggregations) |
void |
setAggregationStyle(Table.AggregationStyle aggregationStyle)
Sets the location of the aggregation row.
|
void |
setButtonsPanel(ButtonsPanel panel)
Sets a
ButtonsPanel component. |
void |
setCaption(java.lang.String caption)
Sets the component's caption.
|
void |
setCaptionAsHtml(boolean captionAsHtml)
Sets whether the caption is rendered as HTML.
|
protected void |
setClientCaching() |
protected void |
setColumnAggregationDescriptionByType(Table.Column<E> column,
java.lang.Object columnId) |
void |
setColumnControlVisible(boolean columnControlVisible)
Sets whether user can hide columns using the columnControlButton dropdown on
the right side of the table header.
|
protected void |
setColumnHeader(java.lang.Object columnId,
java.lang.String caption) |
void |
setColumnHeaderVisible(boolean visible)
Sets whether table header is displayed.
|
void |
setColumnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether or not column reordering is allowed.
|
void |
setContextMenuEnabled(boolean contextMenuEnabled)
Sets whether context menu is enabled.
|
void |
setCurrentAuthentication(io.jmix.core.security.CurrentAuthentication currentAuthentication) |
void |
setDataComponents(DataComponents dataComponents) |
void |
setDatatypeRegistry(io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry) |
void |
setDebugId(java.lang.String id)
INTERNAL.
|
void |
setDefaultSettings(SettingsWrapper wrapper)
Sets default settings for a component.
|
void |
setEditable(boolean editable) |
protected void |
setEditableColumns(java.util.List<io.jmix.core.metamodel.model.MetaPropertyPath> editableColumns) |
void |
setEmptyStateLinkClickHandler(java.util.function.Consumer<Table.EmptyStateClickEvent<E>> handler)
Sets click handler for link message.
|
void |
setEmptyStateLinkMessage(java.lang.String linkMessage)
Sets a link message to the middle of Table body that should be appeared when Table is empty.
|
void |
setEmptyStateMessage(java.lang.String message)
Sets a message to the middle of Table body that should be appeared when Table is empty.
|
void |
setEnterPressAction(Action action)
Assign action to be executed on Enter key press.
|
void |
setEntityStates(io.jmix.core.EntityStates entityStates) |
void |
setIconProvider(java.util.function.Function<? super E,java.lang.String> iconProvider)
Sets the row icon provider for the Table.
|
void |
setIconResolver(IconResolver iconResolver) |
void |
setId(java.lang.String id)
Set component ID
|
void |
setItemClickAction(Action action)
Assign action to be executed on double click inside a table row.
|
void |
setItemDescriptionProvider(java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> provider)
Sets the item description provider that is used for generating tooltip descriptions for items.
|
void |
setItems(TableItems<E> tableItems)
Sets an instance of
TableItems as the Table data source. |
void |
setLookupSelectHandler(java.util.function.Consumer<java.util.Collection<E>> selectHandler) |
void |
setMessages(io.jmix.core.Messages messages) |
void |
setMessageTools(io.jmix.core.MessageTools messageTools) |
void |
setMetadata(io.jmix.core.Metadata metadata) |
void |
setMetadataTools(io.jmix.core.MetadataTools metadataTools) |
void |
setMultiLineCells(boolean multiLineCells)
Sets whether multi-line display is enabled for cells containing several lines of text.
|
void |
setMultiSelect(boolean multiselect)
Sets whether multiple selection mode is enabled.
|
void |
setPagination(PaginationComponent pagination)
Sets pagination component.
|
void |
setRequired(Table.Column column,
boolean required,
java.lang.String message)
Sets whether the component inside a column must contain a non-null value.
|
void |
setRowHeaderMode(Table.RowHeaderMode rowHeaderMode)
Sets the row header mode.
|
void |
setRowHeaderWidth(int width)
Sets the width of row header column.
|
void |
setSelected(java.util.Collection<E> items)
Selects the rows of the list component for a given collection of entity instances.
|
void |
setSelected(E item)
Selects a row of the list component for a given entity instance.
|
protected void |
setSelectedIds(java.util.Collection<java.lang.Object> itemIds) |
void |
setSettingsRegistry(ComponentSettingsRegistry settingsRegistry) |
void |
setShowSelection(boolean showSelection)
Sets whether a current row is highlighted.
|
void |
setShowTotalAggregation(boolean showAggregation)
Shows in which aggregation the changes occurred: in the total or group.
|
void |
setSortable(boolean sortable)
Defines if sortable attribute can be changed for individual column or not.
|
void |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setStyleProvider(Table.StyleProvider<? super E> styleProvider)
Sets the cell style provider for the table.
All style providers added before this call will be removed. |
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
protected void |
setTablePresentationsLayout(TablePresentationsLayout tablePresentations) |
void |
setTextSelectionEnabled(boolean textSelectionEnabled)
Sets whether text selection in Table cells is enabled.
|
void |
setUiComponentProperties(UiComponentProperties componentProperties) |
void |
setUiComponentsGenerator(UiComponentsGenerator uiComponentsGenerator) |
protected void |
setUiTestId(TableItems<E> items) |
void |
setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport) |
protected void |
setupAutowiredColumns(EntityTableItems<E> entityTableSource) |
protected void |
setupColumnSettings(EntityTableItems<E> entityTableSource) |
void |
setupPaginationDataSourceProvider() |
void |
setUserSettingsTools(UserSettingsTools userSettingsTools) |
void |
setViewRepository(io.jmix.core.FetchPlanRepository viewRepository) |
protected void |
setVisibleColumns(java.util.List<?> columnsOrder) |
void |
showCustomPopup(Component popupComponent)
Shows popup inside of Table, relative to last cell click event.
Call this method from Table.Column.ClickEvent implementation. |
void |
showCustomPopupActions(java.util.List<Action> actions)
Shows autocloseable popup view with actions, relative to last cell click event.
Call this method from Table.Column.ClickEvent implementation.Autocloseable means that after any click on action popup will be closed. |
protected void |
showEmptyStateIfPossible() |
protected void |
showParseErrorNotification(java.lang.String message) |
void |
sort(java.lang.String columnId,
Table.SortDirection direction)
Sorts the Table data for passed column id in the chosen sort direction.
|
protected void |
tableSelectionChanged(com.vaadin.v7.data.Property.ValueChangeEvent event) |
void |
tableSourceItemSetChanged(TableItems.ItemSetChangeEvent<E> event) |
void |
tableSourcePropertyValueChanged(TableItems.ValueChangeEvent<E> event) |
void |
tableSourceSelectedItemChanged(TableItems.SelectedItemChangeEvent<E> event) |
void |
tableSourceStateChanged(DataUnit.StateChangeEvent event) |
protected void |
updateCompositionStylesTopPanelVisible() |
protected void |
updatePresentationSettings(TablePresentations p) |
actionPropertyChanged, addAction, addAction, createContextMenuPopup, createShortcutsDelegate, getAction, getActions, getActionsPermissions, initContextMenuButton, initContextMenuPopup, removeAction, removeAction, removeAllActions, setContextMenuButtonAction, setContextMenuButtonCaption, setContextMenuButtonIcon, setThemeConstantsManager
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, 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, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubPart, of
getFrame, setFrame
addAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActions
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
isEditableWithParent
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
getIcon, setIcon, setIconFromSet
isFocusable, setFocusable
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
public static final int MAX_TEXT_LENGTH_GAP
public static final java.lang.String BOOLEAN_CELL_STYLE_TRUE
public static final java.lang.String BOOLEAN_CELL_STYLE_FALSE
protected static final com.vaadin.v7.ui.Table.ColumnGenerator VOID_COLUMN_GENERATOR
protected static final java.lang.String HAS_TOP_PANEL_STYLENAME
protected static final java.lang.String CUSTOM_STYLE_NAME_PREFIX
protected static final java.lang.String EDIT_ACTION_ID
protected static final java.lang.String VIEW_ACTION_ID
protected static final java.lang.Object ROW_HEADER_PROPERTY_ID
protected UiComponentProperties componentProperties
protected IconResolver iconResolver
protected io.jmix.core.MetadataTools metadataTools
protected io.jmix.core.Metadata metadata
protected io.jmix.core.AccessManager accessManager
protected io.jmix.core.Messages messages
protected io.jmix.core.MessageTools messageTools
protected io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry
protected DataComponents dataComponents
protected io.jmix.core.FetchPlanRepository viewRepository
protected UserSettingsTools userSettingsTools
protected ComponentSettingsRegistry settingsRegistry
protected io.jmix.core.EntityStates entityStates
protected Actions actions
protected UiComponentsGenerator uiComponentsGenerator
protected Aggregations aggregations
protected AggregatableDelegate<java.lang.Object> aggregatableDelegate
protected UiTestIdsSupport uiTestIdsSupport
protected java.util.Locale locale
protected java.util.List<java.lang.String> internalStyles
protected java.util.Map<java.lang.Object,Table.Column<E>> columns
protected java.util.List<Table.Column<E>> columnsOrder
protected boolean sortable
protected boolean editable
protected Action itemClickAction
protected Action enterPressAction
@Nullable protected java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> itemDescriptionProvider
protected java.util.function.Function<? super E,java.lang.String> iconProvider
@Nullable protected java.util.List<Table.StyleProvider> styleProviders
@Nullable protected java.util.Map<Table.Column,java.lang.String> requiredColumns
@Nullable protected java.util.Map<java.lang.Object,java.lang.Object> fieldDatasources
protected TableComposition componentComposition
protected com.vaadin.ui.CssLayout topPanel
protected ButtonsPanel buttonsPanel
protected PaginationComponent pagination
protected java.util.Map<Table.Column,java.lang.String> aggregationCells
protected TablePresentations presentations
protected TableSettings defaultTableSettings
protected com.vaadin.v7.ui.Table.ColumnCollapseListener columnCollapseListener
protected Table.AggregationDistributionProvider<E> distributionProvider
protected java.util.Map<java.lang.String,Table.Printable> printables
protected TableDataContainer<E> dataBinding
protected boolean ignoreUnfetchedAttributes
protected com.vaadin.v7.ui.Table.ColumnGenerator VALUE_PROVIDER_GENERATOR
protected java.util.function.Consumer<Table.EmptyStateClickEvent<E>> emptyStateClickLinkHandler
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
@Autowired public void setUiComponentProperties(UiComponentProperties componentProperties)
@Autowired public void setIconResolver(IconResolver iconResolver)
@Autowired public void setAccessManager(io.jmix.core.AccessManager accessManager)
@Autowired public void setMetadataTools(io.jmix.core.MetadataTools metadataTools)
@Autowired public void setMetadata(io.jmix.core.Metadata metadata)
@Autowired public void setMessageTools(io.jmix.core.MessageTools messageTools)
@Autowired public void setMessages(io.jmix.core.Messages messages)
@Autowired public void setCurrentAuthentication(io.jmix.core.security.CurrentAuthentication currentAuthentication)
@Autowired public void setDatatypeRegistry(io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry)
@Autowired public void setDataComponents(DataComponents dataComponents)
@Autowired public void setViewRepository(io.jmix.core.FetchPlanRepository viewRepository)
@Autowired(required=false) public void setUserSettingsTools(UserSettingsTools userSettingsTools)
@Autowired(required=false) public void setSettingsRegistry(ComponentSettingsRegistry settingsRegistry)
@Autowired public void setEntityStates(io.jmix.core.EntityStates entityStates)
@Autowired public void setActions(Actions actions)
@Autowired public void setUiComponentsGenerator(UiComponentsGenerator uiComponentsGenerator)
@Autowired public void setAggregations(Aggregations aggregations)
@Autowired public void setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport)
public java.util.Collection<Component> getInnerComponents()
getInnerComponents
in interface HasInnerComponents
@Nullable protected java.util.Set<java.lang.Object> getSelectedItemIds()
public E getSingleSelected()
ListComponent
null
. If multiple selection mode is enabled, returns the first selected instance.getSingleSelected
in interface ListComponent<E>
public java.util.Set<E> getSelected()
ListComponent
Collections.emptySet()
.getSelected
in interface ListComponent<E>
public void setSelected(@Nullable E item)
ListComponent
setSelected
in interface ListComponent<E>
item
- entity instance to select the row, null
to reset the selectionpublic void setSelected(java.util.Collection<E> items)
ListComponent
setSelected
in interface ListComponent<E>
items
- collection of entity instances to select rowsprotected void setSelectedIds(java.util.Collection<java.lang.Object> itemIds)
protected void attachAction(Action action)
attachAction
in class AbstractActionsHolderComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
public void focus()
Component.Focusable
focus
in interface Component.Focusable
public boolean isMultiSelect()
isMultiSelect
in interface ListComponent<E>
public void setMultiSelect(boolean multiselect)
Table
setMultiSelect
in interface Table<E>
multiselect
- whether multiple selection mode is enabledpublic java.util.List<Table.Column<E>> getColumns()
Table
getColumns
in interface Table<E>
Table.getNotCollapsedColumns()
public java.util.Map<java.lang.Object,Table.Column<E>> getColumnsInternal()
@Nullable public java.util.Map<Table.Column,java.lang.String> getRequiredColumnsInternal()
@Nullable public Table.Column<E> getColumn(java.lang.String id)
Table
public void addColumn(Table.Column<E> column)
Table
Note that column id should be an instance of MetaPropertyPath
.
addColumn
in interface Table<E>
column
- the column to addTable.addColumn(Column, int)
,
Table.addColumn(Object)
,
Table.addColumn(Object, int)
public void addColumn(Table.Column<E> column, int index)
Table
Note that column id should be an instance of MetaPropertyPath
.
addColumn
in interface Table<E>
column
- the column to addindex
- index of a new columnTable.addColumn(Column)
,
Table.addColumn(Object)
,
Table.addColumn(Object, int)
public Table.Column<E> addColumn(java.lang.Object id)
Table
addColumn
in interface Table<E>
id
- the column id or the instance of MetaPropertyPath
representing a relative path
to a property from certain MetaClass
Table.addColumn(Column)
,
Table.addColumn(Column, int)
,
Table.addColumn(Object, int)
public Table.Column<E> addColumn(java.lang.Object id, int index)
Table
addColumn
in interface Table<E>
id
- the column id or the instance of MetaPropertyPath
representing a relative path
to a property from certain MetaClass
index
- index of a new columnTable.addColumn(Column)
,
Table.addColumn(Column, int)
,
Table.addColumn(Object)
protected AbstractTable.ColumnImpl<E> createColumn(java.lang.Object id, AbstractTable<?,E> owner)
@Nullable protected java.lang.Class getColumnType(Table.Column<E> column)
protected void addColumnInternal(Table.Column<E> column, int index)
protected void setColumnAggregationDescriptionByType(Table.Column<E> column, java.lang.Object columnId)
public void removeColumn(Table.Column column)
Table
null
.removeColumn
in interface Table<E>
column
- the column to removepublic InstanceContainer<E> getInstanceContainer(E item)
Table
carsTable.addGeneratedColumn("name", car -> {
TextField<String> textField = uiComponents.create(TextField.NAME);
textField.setValueSource(new ContainerValueSource<>(carsTable.getInstanceContainer(car),"name"));
textField.setValue(car.getName());
return textField;
});
getInstanceContainer
in interface Table<E>
item
- entity itemprotected void addGeneratedColumnInternal(java.lang.Object id, com.vaadin.v7.ui.Table.ColumnGenerator generator)
protected void removeGeneratedColumnInternal(java.lang.Object id)
public void addPrintable(java.lang.String columnId, Table.Printable<? super E,?> printable)
Table
Table.Printable
representation for column. addPrintable
in interface Table<E>
columnId
- column idprintable
- printable representationpublic void removePrintable(java.lang.String columnId)
Table
Table.Printable
representation of column. removePrintable
in interface Table<E>
columnId
- column id@Nullable public Table.Printable getPrintable(Table.Column column)
Table
Table.Printable
representation for column.getPrintable
in interface Table<E>
column
- table column@Nullable public Table.Printable getPrintable(java.lang.String columnId)
Table
Table.Printable
representation for column.getPrintable
in interface Table<E>
columnId
- column idpublic boolean isEditable()
isEditable
in interface Component.Editable
public void setEditable(boolean editable)
setEditable
in interface Component.Editable
protected void enableEditableColumns(EntityTableItems<E> entityTableSource, java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> propertyIds)
protected void disableEditableColumns(EntityTableItems<E> entityTableSource, java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> propertyIds)
protected java.util.function.Consumer<Table.Column.ClickEvent> createLinkCellClickListener()
protected void setEditableColumns(java.util.List<io.jmix.core.metamodel.model.MetaPropertyPath> editableColumns)
public boolean isSortable()
isSortable
in interface Table<E>
true
if individual column sortable
attribute can be set to true
, false
otherwisepublic void setSortable(boolean sortable)
Table
true
.setSortable
in interface Table<E>
sortable
- true
if individual column sortable
attribute can be set to true
, false
otherwisepublic boolean getColumnReorderingAllowed()
Table
true
.getColumnReorderingAllowed
in interface Table<E>
true
if reordering is allowedpublic io.jmix.core.common.event.Subscription addColumnReorderListener(java.util.function.Consumer<Table.ColumnReorderEvent<E>> listener)
Table
addColumnReorderListener
in interface Table<E>
listener
- the listener to addpublic void setColumnReorderingAllowed(boolean columnReorderingAllowed)
Table
true
.setColumnReorderingAllowed
in interface Table<E>
columnReorderingAllowed
- specifies whether column reordering is allowedpublic boolean getColumnControlVisible()
getColumnControlVisible
in interface Table<E>
public void setColumnControlVisible(boolean columnControlVisible)
Table
setColumnControlVisible
in interface Table<E>
columnControlVisible
- whether user can hide columns using the
columnControlButton dropdown on the right side
of the table headerpublic void sort(java.lang.String columnId, Table.SortDirection direction)
Table
@Nullable public Table.SortInfo getSortInfo()
getSortInfo
in interface Table<E>
@Nullable public PaginationComponent getPagination()
getPagination
in interface HasPagination
public void setPagination(@Nullable PaginationComponent pagination)
HasPagination
setPagination
in interface HasPagination
public void setupPaginationDataSourceProvider()
protected void updateCompositionStylesTopPanelVisible()
public boolean isMultiLineCells()
isMultiLineCells
in interface Table<E>
public void setMultiLineCells(boolean multiLineCells)
Table
setMultiLineCells
in interface Table<E>
multiLineCells
- whether multi-line display is enabled for cells containing several
lines of textpublic boolean isAggregatable()
isAggregatable
in interface Table<E>
public void setAggregatable(boolean aggregatable)
Table
setAggregatable
in interface Table<E>
aggregatable
- whether aggregation is enabled.public java.util.Map<java.lang.Object,java.lang.Object> getAggregationResults()
Table
getAggregationResults
in interface Table<E>
public Table.AggregationStyle getAggregationStyle()
getAggregationStyle
in interface Table<E>
public void setAggregationStyle(Table.AggregationStyle aggregationStyle)
Table
setAggregationStyle
in interface Table<E>
aggregationStyle
- the location of the aggregation rowpublic boolean isShowTotalAggregation()
isShowTotalAggregation
in interface Table<E>
true
if the aggregation column should show changes in
total aggregation, false
if in the group aggregationpublic void setShowTotalAggregation(boolean showAggregation)
Table
setShowTotalAggregation
in interface Table<E>
showAggregation
- true
if the aggregation column should show
changes in total aggregation, false
if in
the group aggregationpublic com.vaadin.ui.Component getComposition()
getComposition
in interface Component.Wrapper
getComposition
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
public boolean isContextMenuEnabled()
isContextMenuEnabled
in interface Table<E>
public void setContextMenuEnabled(boolean contextMenuEnabled)
Table
setContextMenuEnabled
in interface Table<E>
contextMenuEnabled
- whether context menu is enabledpublic int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
component.
The tab index property is used to specify the order in which the
fields are focused when the user presses the Tab key. Components with
a defined tab index are focused sequentially first, and then the
components with no tab index.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexprotected void setTablePresentationsLayout(TablePresentationsLayout tablePresentations)
protected void initComponent(T component)
protected void onColumnReorder(com.vaadin.v7.ui.Table.ColumnReorderEvent e)
protected java.util.List<Table.Column<E>> getColumnsOrderInternal()
protected void onAfterUnregisterComponent(com.vaadin.ui.Component component)
protected void onBeforeRefreshRowCache()
protected void tableSelectionChanged(com.vaadin.v7.data.Property.ValueChangeEvent event)
protected void fireSelectionEvent(com.vaadin.v7.data.Property.ValueChangeEvent e)
@Nullable protected java.lang.String formatCellValue(java.lang.Object rowId, java.lang.Object colId, @Nullable com.vaadin.v7.data.Property<?> property)
protected TableFieldFactoryImpl createFieldFactory()
protected void setClientCaching()
protected void refreshActionsState()
protected AbstractTable.StyleGeneratorAdapter createStyleGenerator()
@Nullable protected java.lang.String getGeneratedCellStyle(java.lang.Object itemId, @Nullable java.lang.Object propertyId)
@Nullable protected java.lang.String generateCellDescription(java.lang.Object itemId, @Nullable java.lang.Object propertyId)
protected JmixButton createContextMenuButton()
createContextMenuButton
in class AbstractActionsHolderComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
protected void beforeContextMenuButtonHandlerPerformed()
beforeContextMenuButtonHandlerPerformed
in class AbstractActionsHolderComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
protected void handleClickAction()
public void setLookupSelectHandler(java.util.function.Consumer<java.util.Collection<E>> selectHandler)
setLookupSelectHandler
in interface LookupComponent<E>
selectHandler
- handler that should be executed when a user select an item in the lookup screenprotected void removeAllClickListeners()
public java.util.Collection<E> getLookupSelectedItems()
getLookupSelectedItems
in interface LookupComponent<E>
@Nullable protected Action getEnterAction()
protected void createColumns(com.vaadin.v7.data.Container ds)
@Nullable public TableItems<E> getItems()
public void setItems(@Nullable TableItems<E> tableItems)
Table
TableItems
as the Table data source.protected void setUiTestId(TableItems<E> items)
protected java.util.List<java.lang.Object> getPropertyColumns(EntityTableItems<E> entityTableSource, java.util.List<Table.Column<E>> columnsOrder)
protected void setupColumnSettings(EntityTableItems<E> entityTableSource)
protected void setupAutowiredColumns(EntityTableItems<E> entityTableSource)
protected java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> getAutowiredProperties(EntityTableItems<E> entityTableSource)
public void tableSourceItemSetChanged(TableItems.ItemSetChangeEvent<E> event)
tableSourceItemSetChanged
in interface TableItemsEventsDelegate<E>
protected void clearFieldDatasources()
public void tableSourcePropertyValueChanged(TableItems.ValueChangeEvent<E> event)
tableSourcePropertyValueChanged
in interface TableItemsEventsDelegate<E>
protected void handleAggregation()
public void tableSourceSelectedItemChanged(TableItems.SelectedItemChangeEvent<E> event)
tableSourceSelectedItemChanged
in interface TableItemsEventsDelegate<E>
public void tableSourceStateChanged(DataUnit.StateChangeEvent event)
tableSourceStateChanged
in interface TableItemsEventsDelegate<E>
protected TableDataContainer<E> createTableDataContainer(TableItems<E> tableItems)
protected boolean canBeSorted(@Nullable TableItems<E> tableItems)
public void setDebugId(@Nullable java.lang.String id)
HasDebugId
setDebugId
in interface HasDebugId
setDebugId
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
public void setId(@Nullable java.lang.String id)
Component
setId
in interface Component
setId
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
protected java.lang.String getColumnCaption(java.lang.Object columnId)
protected java.lang.String getColumnCaption(java.lang.Object columnId, Table.Column column)
protected void createStubsForGeneratedColumns()
protected java.util.List<java.lang.Object> getInitialVisibleColumnIds(EntityTableItems<E> entityTableSource)
protected void setVisibleColumns(java.util.List<?> columnsOrder)
protected void setColumnHeader(java.lang.Object columnId, java.lang.String caption)
public void setRowHeaderMode(Table.RowHeaderMode rowHeaderMode)
Table
setRowHeaderMode
in interface Table<E>
rowHeaderMode
- row header modepublic void setRequired(Table.Column column, boolean required, java.lang.String message)
Table
setRequired
in interface Table<E>
column
- a columnrequired
- requiredmessage
- required messagepublic java.lang.String getStyleName()
Component
getStyleName
in interface Component
getStyleName
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
public void setStyleName(@Nullable java.lang.String name)
Component
setStyleName
in interface Component
setStyleName
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
name
- one or more style names separated by space.public void setStyleProvider(@Nullable Table.StyleProvider<? super E> styleProvider)
Table
setStyleProvider
in interface Table<E>
styleProvider
- a style provider to setpublic void addStyleProvider(Table.StyleProvider<? super E> styleProvider)
Table
addStyleProvider
in interface Table<E>
styleProvider
- a style provider to addpublic void removeStyleProvider(Table.StyleProvider<? super E> styleProvider)
Table
removeStyleProvider
in interface Table<E>
styleProvider
- a style provider to removepublic void setIconProvider(@Nullable java.util.function.Function<? super E,java.lang.String> iconProvider)
Table
setIconProvider
in interface Table<E>
iconProvider
- an icon provider to setTable.setRowHeaderMode(RowHeaderMode)
@Nullable protected com.vaadin.server.Resource getItemIcon(java.lang.Object itemId)
public void setItemDescriptionProvider(@Nullable java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> provider)
Table
All unhandled exceptions from ItemDescriptionProvider in Web components by default are logged with ERROR level and not shown to users.
setItemDescriptionProvider
in interface Table<E>
provider
- the item description provider to use or null
to remove a
previously set provider if any@Nullable public java.util.function.BiFunction<? super E,java.lang.String,java.lang.String> getItemDescriptionProvider()
Table
getItemDescriptionProvider
in interface Table<E>
public int getRowHeaderWidth()
getRowHeaderWidth
in interface Table<E>
public void setRowHeaderWidth(int width)
Table
setRowHeaderWidth
in interface Table<E>
width
- width of row header column in px@Nullable public Action getEnterPressAction()
getEnterPressAction
in interface Table<E>
Table.setEnterPressAction(Action)
public void setEnterPressAction(Action action)
Table
If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
Table.setItemClickAction(Action)
shortcut
propertysetEnterPressAction
in interface Table<E>
@Nullable public Action getItemClickAction()
getItemClickAction
in interface Table<E>
Table.setItemClickAction(Action)
public void setItemClickAction(Action action)
Table
If such action is not set, the table responds to double click by trying to find and execute the following actions:
shortcut
propertysetItemClickAction
in interface Table<E>
@Nullable public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
getCaption
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
public void setCaption(@Nullable java.lang.String caption)
Component.HasCaption
setCaption
in interface Component.HasCaption
setCaption
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
caption
- the new component's captionpublic boolean isCaptionAsHtml()
isCaptionAsHtml
in interface HasHtmlCaption
isCaptionAsHtml
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
true
if the caption is rendered as HTML,
false
if rendered as plain textpublic void setCaptionAsHtml(boolean captionAsHtml)
HasHtmlCaption
setCaptionAsHtml
in interface HasHtmlCaption
setCaptionAsHtml
in class AbstractComponent<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>
captionAsHtml
- true
if the caption is rendered as HTML,
false
if rendered as plain textComponent.HasCaption.setCaption(String)
@Nullable public ButtonsPanel getButtonsPanel()
getButtonsPanel
in interface HasButtonsPanel
public void setButtonsPanel(@Nullable ButtonsPanel panel)
HasButtonsPanel
ButtonsPanel
component.setButtonsPanel
in interface HasButtonsPanel
panel
- a buttons panel componentprotected com.vaadin.ui.CssLayout createTopPanel()
public void addGeneratedColumn(java.lang.String columnId, Table.ColumnGenerator<? super E> generator)
Table
addGeneratedColumn
in interface Table<E>
columnId
- column identifier as defined in XML descriptor.
May or may not correspond to an entity property.generator
- column generator instancepublic void addGeneratedColumn(java.lang.String columnId, int index, Table.ColumnGenerator<? super E> generator)
Table
addGeneratedColumn
in interface Table<E>
columnId
- column identifier as defined in XML descriptor. May correspond to an entity propertyindex
- index of a new columngenerator
- column generator instancepublic void addGeneratedColumn(java.lang.String columnId, Table.ColumnGenerator<? super E> generator, java.lang.Class<? extends Component> componentClass)
Table
addGeneratedColumn
in interface Table<E>
columnId
- column identifier as defined in XML descriptor.
May or may not correspond to an entity property.generator
- column generator instancecomponentClass
- class of components that generator will providepublic void removeGeneratedColumn(java.lang.String columnId)
Table
removeGeneratedColumn
in interface Table<E>
columnId
- the column idpublic boolean isTextSelectionEnabled()
isTextSelectionEnabled
in interface Table<E>
public void setTextSelectionEnabled(boolean textSelectionEnabled)
Table
setTextSelectionEnabled
in interface Table<E>
textSelectionEnabled
- whether text selection in Table cells is enabledpublic void repaint()
Table
public void selectAll()
Table
protected void checkAggregation(AggregationInfo aggregationInfo)
protected AggregatableDelegate<java.lang.Object> getAggregatableDelegate()
protected java.util.Map<java.lang.Object,java.lang.Object> __aggregateValues(AggregationContainer container, AggregationContainer.Context context)
protected java.util.Map<java.lang.Object,java.lang.Object> __aggregate(AggregationContainer container, AggregationContainer.Context context)
protected java.util.List<AggregationInfo> getAggregationInfos(AggregationContainer container)
protected java.util.Map<java.lang.Object,java.lang.Object> convertAggregationKeyMapToColumnIdKeyMap(AggregationContainer container, java.util.Map<AggregationInfo,?> aggregationInfoMap)
protected java.util.Map<java.lang.Object,java.lang.Object> __handleAggregationResults(AggregationContainer.Context context, java.util.Map<java.lang.Object,java.lang.Object> results)
protected java.lang.String getFormattedValue(Table.Column<E> column, @Nullable java.lang.Object value)
protected void removeAggregationCell(Table.Column column)
protected void addAggregationCell(Table.Column column)
protected boolean handleSpecificVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
protected void handlePresentationVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
protected void updatePresentationSettings(TablePresentations p)
protected ComponentSettingsBinder getSettingsBinder()
protected boolean isSettingsAvailable()
protected boolean needUpdatePresentation(java.util.Map<java.lang.String,java.lang.Object> variables)
public java.util.List<Table.Column> getNotCollapsedColumns()
getNotCollapsedColumns
in interface Table<E>
public void resetPresentation()
resetPresentation
in interface HasTablePresentations
public void loadPresentations()
loadPresentations
in interface HasTablePresentations
@Nullable public TablePresentations getPresentations()
getPresentations
in interface HasTablePresentations
public void applyPresentation(java.lang.Object id)
applyPresentation
in interface HasTablePresentations
public void applyPresentationAsDefault(java.lang.Object id)
applyPresentationAsDefault
in interface HasTablePresentations
protected void applyPresentation(TablePresentation p)
protected void applyPresentationSettings(TablePresentation p)
protected ComponentSettings getSettingsFromPresentation(TablePresentation p)
protected TablePresentationsLayout createTablePresentationsLayout()
protected TablePresentations createTablePresentations()
@Nullable public java.lang.Object getDefaultPresentationId()
getDefaultPresentationId
in interface HasTablePresentations
public void setDefaultSettings(SettingsWrapper wrapper)
HasTablePresentations
setDefaultSettings
in interface HasTablePresentations
wrapper
- settings wrapper@Nullable public ComponentSettings getDefaultSettings()
getDefaultSettings
in interface HasTablePresentations
public io.jmix.core.common.event.Subscription addColumnCollapseListener(java.util.function.Consumer<Table.ColumnCollapseEvent<E>> listener)
Table
addColumnCollapseListener
in interface Table<E>
listener
- a listener to addSubscription
objectprotected void internalRemoveColumnCollapseListener(java.util.function.Consumer<Table.ColumnCollapseEvent<E>> listener)
protected void onColumnCollapseStateChange(com.vaadin.v7.ui.Table.ColumnCollapseEvent e)
public io.jmix.core.common.event.Subscription addSelectionListener(java.util.function.Consumer<Table.SelectionEvent<E>> listener)
Table
addSelectionListener
in interface Table<E>
listener
- the listener to registerpublic void showCustomPopup(Component popupComponent)
Table
Table.Column.ClickEvent
implementation.showCustomPopup
in interface Table<E>
popupComponent
- popup contentpublic void showCustomPopupActions(java.util.List<Action> actions)
Table
Table.Column.ClickEvent
implementation.showCustomPopupActions
in interface Table<E>
actions
- actionspublic boolean isColumnHeaderVisible()
isColumnHeaderVisible
in interface Table<E>
public void setColumnHeaderVisible(boolean visible)
Table
setColumnHeaderVisible
in interface Table<E>
visible
- whether table header is displayedpublic boolean isShowSelection()
isShowSelection
in interface Table<E>
public void setShowSelection(boolean showSelection)
Table
setShowSelection
in interface Table<E>
showSelection
- whether a current row is highlighted@Nullable protected java.lang.String generateCellStyle(@Nullable java.lang.Object itemId, @Nullable java.lang.Object propertyId)
protected boolean isValueGeneratedColumn(java.lang.Object propertyId)
@Nullable protected java.lang.String generateDefaultCellStyle(java.lang.Object itemId, java.lang.Object propertyId, @Nullable io.jmix.core.metamodel.model.MetaPropertyPath propertyPath)
@Nullable protected java.lang.String generateClickableCellStyles(java.lang.Object itemId, Table.Column column, io.jmix.core.metamodel.model.MetaPropertyPath propertyPath)
public void setAggregationDistributionProvider(@Nullable Table.AggregationDistributionProvider<E> distributionProvider)
Table
setAggregationDistributionProvider
in interface Table<E>
distributionProvider
- distribution providerprotected boolean distributeAggregation(JmixEnhancedTable.AggregationInputValueChangeContext context)
@Nullable public Table.AggregationDistributionProvider<E> getAggregationDistributionProvider()
getAggregationDistributionProvider
in interface Table<E>
public void requestFocus(E item, java.lang.String columnId)
Table
requestFocus
in interface Table<E>
item
- entitycolumnId
- column idpublic void scrollTo(E item)
Table
protected void handleColumnCollapsed(com.vaadin.v7.ui.Table.ColumnCollapseEvent event)
protected void beforeComponentPaint()
@Nullable protected java.lang.Object getValueExIgnoreUnfetched(@Nullable java.lang.Object instance, java.lang.String[] properties)
public io.jmix.core.common.event.Subscription addLookupValueChangeListener(java.util.function.Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener)
LookupComponent.LookupSelectionChangeNotifier
addLookupValueChangeListener
in interface LookupComponent.LookupSelectionChangeNotifier<E>
listener
- a listener to addSubscription
@Nullable public java.lang.Object createInstallHandler(java.lang.Class<?> targetObjectType, FrameOwner frameOwner, java.lang.reflect.Method method)
createInstallHandler
in interface InstallTargetHandler
public void setEmptyStateMessage(@Nullable java.lang.String message)
Table
setEmptyStateMessage
in interface Table<E>
message
- message that appears when Table is empty@Nullable public java.lang.String getEmptyStateMessage()
getEmptyStateMessage
in interface Table<E>
public void setEmptyStateLinkMessage(@Nullable java.lang.String linkMessage)
Table
setEmptyStateLinkMessage
in interface Table<E>
linkMessage
- message that appears when Table is emptyTable.setEmptyStateLinkClickHandler(Consumer)
@Nullable public java.lang.String getEmptyStateLinkMessage()
getEmptyStateLinkMessage
in interface Table<E>
public void setEmptyStateLinkClickHandler(@Nullable java.util.function.Consumer<Table.EmptyStateClickEvent<E>> handler)
Table
setEmptyStateLinkClickHandler
in interface Table<E>
handler
- handler to setTable.setEmptyStateLinkMessage(String)
@Nullable public java.util.function.Consumer<Table.EmptyStateClickEvent<E>> getEmptyStateLinkClickHandler()
getEmptyStateLinkClickHandler
in interface Table<E>
@Nullable protected java.lang.Object getParsedAggregationValue(java.lang.String value, java.lang.Object columnId) throws java.text.ParseException
java.text.ParseException
protected void showParseErrorNotification(java.lang.String message)
protected void initEmptyState()
protected void showEmptyStateIfPossible()