Class TreeDataGridImpl<E>
- All Implemented Interfaces:
ActionsHolder
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,DataGrid<E>
,DataGridItemsEventsDelegate<E>
,HasButtonsPanel
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInnerComponents
,HasMinSize
,HasPagination
,HasSubParts
,ListComponent<E>
,LookupComponent<E>
,LookupComponent.LookupSelectionChangeNotifier<E>
,SecuredActionsHolder
,TreeDataGrid<E>
,org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.impl.AbstractDataGrid
AbstractDataGrid.AbstractRenderer<T,
V>, AbstractDataGrid.AbstractStaticCellImpl, AbstractDataGrid.AbstractStaticRowImp<T extends DataGrid.StaticCell>, AbstractDataGrid.ActionMenuItemWrapper, AbstractDataGrid.CellDescriptionGeneratorAdapter<T extends E>, AbstractDataGrid.CellStyleGeneratorAdapter<T extends E>, AbstractDataGrid.ColumnImpl<E>, AbstractDataGrid.DataGridEditorCustomField<T>, AbstractDataGrid.DataGridEditorFieldFactoryAdapter<E>, AbstractDataGrid.FooterCellImpl, AbstractDataGrid.FooterRowImpl, AbstractDataGrid.GridComposition, AbstractDataGrid.HeaderCellImpl, AbstractDataGrid.HeaderRowImpl 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.DataGrid
DataGrid.AbstractDataGridEditorEvent<E>, DataGrid.AbstractDataGridEvent, DataGrid.AggregationPosition, DataGrid.ButtonRenderer<T>, DataGrid.CheckBoxRenderer, DataGrid.ClickableTextRenderer<T>, DataGrid.Column<E>, DataGrid.ColumnCollapsingChangeEvent, DataGrid.ColumnGeneratorEvent<E>, DataGrid.ColumnReorderEvent, DataGrid.ColumnResizeEvent, DataGrid.ColumnResizeMode, DataGrid.ComponentRenderer, DataGrid.ContextClickEvent, DataGrid.DataGridClickEvent, DataGrid.DataGridStaticCellType, DataGrid.DateRenderer, DataGrid.EditorCloseEvent<E>, DataGrid.EditorFieldGenerationContext<T>, DataGrid.EditorOpenEvent<E>, DataGrid.EditorPostCommitEvent<E>, DataGrid.EditorPreCommitEvent<E>, DataGrid.EmptyStateClickEvent<E>, DataGrid.FooterCell, DataGrid.FooterRow, DataGrid.HasDateTimeFormatter, DataGrid.HasFormatString, DataGrid.HasLocale, DataGrid.HasNullRepresentation, DataGrid.HasRendererClickListener<T>, DataGrid.HeaderCell, DataGrid.HeaderRow, DataGrid.HtmlRenderer, DataGrid.IconRenderer<T>, DataGrid.ImageRenderer<T>, DataGrid.ItemClickEvent<E>, DataGrid.LocalDateRenderer, DataGrid.LocalDateTimeRenderer, DataGrid.NumberRenderer, DataGrid.ProgressBarRenderer, DataGrid.Renderer, DataGrid.RendererClickEvent<T>, DataGrid.ScrollDestination, DataGrid.SelectionEvent<E>, DataGrid.SelectionMode, DataGrid.SortDirection, DataGrid.SortEvent, DataGrid.SortOrder, DataGrid.StaticCell, DataGrid.StaticRow<T extends DataGrid.StaticCell>, DataGrid.TextRenderer
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested 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.TreeDataGrid
TreeDataGrid.CollapseEvent<E>, TreeDataGrid.ExpandEvent<E>
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected DataGrid.Column<E>
Fields inherited from class io.jmix.ui.component.impl.AbstractDataGrid
accessManager, actionList, actions, actionsPermissions, aggregatableDelegate, aggregations, buttonsPanel, columnCollapsingChangeListenerRegistration, columnGenerators, columnResizeListenerRegistration, columns, columnsCollapsingAllowed, columnsOrder, componentComposition, contextClickListenerRegistration, contextMenu, contextMenuItems, dataBinding, detailsGenerator, editorBeforeSaveListener, editorCancelListener, editorCrossFieldValidate, editorOpenListener, editorSaveListener, emptyStateClickEventHandler, enterPressAction, footerAggregationRow, footerRows, HAS_TOP_PANEL_STYLE_NAME, headerAggregationRow, headerRows, iconResolver, internalStyles, itemClickAction, itemDatasources, messages, messageTools, metadataTools, pagination, rowDescriptionProvider, rowStyleProviders, screenValidation, selectionMode, shortcutsDelegate, showIconsForPopupMenuActions, sortable, TEXT_SELECTION_ENABLED_STYLE, textSelectionEnabled, topPanel, uiTestIdsSupport
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.TreeDataGrid
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCollapseListener
(Consumer<TreeDataGrid.CollapseEvent<E>> listener) Registers a new collapse listener.addExpandListener
(Consumer<TreeDataGrid.ExpandEvent<E>> listener) Registers a new expand listener.void
collapse
(Collection<E> items) Collapse the given items.void
Collapses all items.void
collapseRecursively
(Stream<E> items, int depth) Collapse the given items and their children recursively until the given depth.protected JmixTreeGrid<E>
protected DataGridDataProvider<E>
createDataGridDataProvider
(DataGridItems<E> dataGridItems) protected com.vaadin.data.provider.DataProvider<E,
?> protected void
editItemInternal
(E itemToEdit) void
expand
(Collection<E> items) Expands the given items.void
Expands all items.void
expandRecursively
(Stream<E> items, int depth) Expands the given items and their children recursively until the given depth.Get the currently set hierarchy column.getItems()
int
Returns the hierarchy level of an item.protected TreeDataGridItems<E>
protected void
initComponent
(com.vaadin.ui.Grid<E> component) boolean
isExpanded
(E item) Returns whether a given item is expanded or collapsed.protected boolean
isItemVisible
(E item) protected void
onColumnReorder
(com.vaadin.ui.Grid.ColumnReorderEvent e) protected void
onItemCollapse
(com.vaadin.event.CollapseEvent<E> e) protected void
onItemExpand
(com.vaadin.event.ExpandEvent<E> e) void
scrollTo
(E item, DataGrid.ScrollDestination destination) Scrolls to a certain item, using user-specified scroll destination.void
setHierarchyColumn
(DataGrid.Column<E> column) Set the column that displays the hierarchy of this DataGrid's data.void
Set the column that displays the hierarchy of this DataGrid's data.protected void
setHierarchyColumnInternal
(com.vaadin.ui.Grid.Column<E, ?> newHierarchyColumn) void
setItemCollapseAllowedProvider
(Predicate<E> provider) Sets the item collapse allowed provider for this TreeDataGrid.void
setItems
(DataGridItems<E> dataGridItems) Sets an instance ofDataGridItems
as the DataGrid data source.protected void
updateColumnCollapsible
(com.vaadin.ui.Grid.Column<E, ?> vColumn) Methods inherited from class io.jmix.ui.component.impl.AbstractDataGrid
__aggregate, __aggregateValues, addAction, addAction, addColumn, addColumn, addColumn, addColumn, addColumnCollapsingChangeListener, addColumnId, addColumnInternal, addColumnReorderListener, addColumnResizeListener, addContextClickListener, addEditorCloseListener, addEditorOpenListener, addEditorPostCommitListener, addEditorPreCommitListener, addFooterRowAt, addFooterRowInternal, addGeneratedColumn, addGeneratedColumn, addHeaderRowAt, addHeaderRowInternal, addItemClickListener, addLookupValueChangeListener, addRowStyleProvider, addSelectionListener, addSortListener, afterPropertiesSet, appendFooterRow, appendHeaderRow, attachAction, attached, calculateFooterIndex, canBeSorted, checkAggregation, checkHeaderIndexInRange, clearFieldDatasources, closeEditor, convertAggregationKeyMapToColumnIdKeyMap, convertToDataGridSortOrder, convertToJmixFields, copyColumnProperties, createColumn, createComponentComposition, createContextMenuItem, createEditorFieldFactory, createEnterShortcutListener, createGeneratedColumnValueProvider, createInstanceContainer, createShortcutsDelegate, createTopPanel, createValueSourceProvider, dataGridSourceItemSetChanged, dataGridSourcePropertyValueChanged, dataGridSourceSelectedItemChanged, dataGridSourceStateChanged, deselect, deselectAll, detached, detachItemContainer, edit, enableCrossFieldValidationHandling, fillAggregationRow, fireSelectionEvent, focus, generateColumnCaption, getAction, getActions, getActionsPermissions, getAggregatableDelegate, getAggregationInfos, getAggregationPosition, getAggregationResults, getAutowiredProperties, getBodyRowHeight, getButtonsPanel, getCaption, getColumn, getColumnAggregationDescription, getColumnAggregationDescriptionByType, getColumnByGridColumn, getColumnById, getColumnGenerator, getColumnNN, getColumnOrder, getColumnPresentationValueProvider, getColumnRendererImplementation, getColumnResizeMode, getColumns, getColumnsOrderInternal, getComposition, getDataGridItemsNN, getDefaultHeaderRow, getDefaultPresentationValueProvider, getDefaultRenderer, getDetailsGenerator, getEditedItem, getEditorCancelCaption, getEditorSaveCaption, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterAction, getEnterPressAction, getEntityDataGridItems, getEntityDataGridItemsNN, getFooterRow, getFooterRowByGridRow, getFooterRowCount, getFooterRowHeight, getFrozenColumnCount, getGeneratedCellDescription, getGeneratedCellStyle, getGeneratedRowStyle, getHeaderRow, getHeaderRowByGridRow, getHeaderRowCount, getHeaderRowHeight, getInitialVisibleColumns, getInnerComponents, getItemClickAction, getLookupSelectedItems, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getPagination, getRowDescription, getRowDescriptionProvider, getRowDetails, getSelected, getSelectionMode, getSingleSelected, getSortOrder, getTabIndex, getVisibleColumns, handleDoubleClickAction, initAggregationRow, initComponentComposition, initContextMenu, initEditor, initEmptyState, initFooterRows, initHeaderRows, initSidebarMenu, internalRemoveColumnCollapsingChangeListener, internalRemoveColumnResizeListener, internalRemoveContextClickListener, internalRemoveEditorCloseListener, internalRemoveEditorOpenListener, internalRemoveEditorPostCommitListener, internalRemoveEditorPreCommitListener, isAggregatable, isCaptionAsHtml, isColumnReorderingAllowed, isColumnsCollapsingAllowed, isContextMenuEnabled, isDetailsVisible, isEditorActive, isEditorBuffered, isEditorCrossFieldValidate, isEditorEnabled, isFooterVisible, isHeaderVisible, isMultiSelect, isSortable, isTextSelectionEnabled, onBeforeRefreshGridData, onColumnResize, onColumnVisibilityChanged, onContextClick, onEditorBeforeSave, onEditorCancel, onEditorOpen, onEditorSave, onItemClick, onPaginationAfterRefresh, onSelectionChange, onSort, prependFooterRow, prependHeaderRow, refreshActionsState, removeAction, removeAction, removeAggregationRow, removeAllActions, removeColumn, removeColumn, removeColumnId, removeFooterRow, removeFooterRow, removeHeaderRow, removeHeaderRow, removeRowStyleProvider, repaint, restoreColumnsOrder, restoreColumnsOrderAndUpdate, scrollTo, scrollToEnd, scrollToStart, selectAll, setAccessManager, setActions, setAggregatable, setAggregationPosition, setAggregations, setBodyRowHeight, setButtonsPanel, setCaption, setCaptionAsHtml, setColumnReorderingAllowed, setColumnResizeMode, setColumnsCollapsingAllowed, setContextMenuEnabled, setDebugId, setDefaultHeaderRow, setDetailsGenerator, setDetailsVisible, setEditorBuffered, setEditorCancelCaption, setEditorCrossFieldValidate, setEditorEnabled, setEditorSaveCaption, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setFooterRowHeight, setFooterVisible, setFrozenColumnCount, setHeaderRowHeight, setHeaderVisible, setIconResolver, setId, setItemClickAction, setLookupSelectHandler, setMessages, setMessageTools, setMetadataTools, setMinHeight, setMinWidth, setPagination, setRowDescriptionProvider, setRowDescriptionProvider, setScreenValidation, setSelected, setSelected, setSelectedItems, setSelectionMode, setSortable, setStyleName, setTabIndex, setTextSelectionEnabled, setThemeConstantsManager, setUiTestId, setUiTestIdsSupport, setupAutowiredColumns, setupGridColumnProperties, setupPaginationDataSourceProvider, setVisibleColumns, showEmptyStateIfPossible, sort, updateAggregationRow, updateCompositionStylesTopPanelVisible, validateCrossFieldRules
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActions
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.DataGrid
addColumn, addColumn, addColumn, addColumn, addColumnCollapsingChangeListener, addColumnReorderListener, addColumnResizeListener, addContextClickListener, addEditorCloseListener, addEditorOpenListener, addEditorPostCommitListener, addEditorPreCommitListener, addFooterRowAt, addGeneratedColumn, addGeneratedColumn, addHeaderRowAt, addItemClickListener, addRowStyleProvider, addSelectionListener, addSortListener, appendFooterRow, appendHeaderRow, closeEditor, deselect, deselectAll, edit, getAggregationPosition, getAggregationResults, getBodyRowHeight, getColumn, getColumnGenerator, getColumnNN, getColumnResizeMode, getColumns, getDefaultHeaderRow, getDetailsGenerator, getEditedItem, getEditorCancelCaption, getEditorSaveCaption, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterPressAction, getFooterRow, getFooterRowCount, getFooterRowHeight, getFrozenColumnCount, getHeaderRow, getHeaderRowCount, getHeaderRowHeight, getItemClickAction, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getRowDescriptionProvider, getSelectionMode, getSortOrder, getSubPart, getVisibleColumns, isAggregatable, isColumnReorderingAllowed, isColumnsCollapsingAllowed, isContextMenuEnabled, isDetailsVisible, isEditorActive, isEditorBuffered, isEditorCrossFieldValidate, isEditorEnabled, isFooterVisible, isHeaderVisible, isSortable, isTextSelectionEnabled, prependFooterRow, prependHeaderRow, removeColumn, removeColumn, removeFooterRow, removeFooterRow, removeHeaderRow, removeHeaderRow, removeRowStyleProvider, repaint, scrollTo, scrollToEnd, scrollToStart, selectAll, setAggregatable, setAggregationPosition, setBodyRowHeight, setColumnReorderingAllowed, setColumnResizeMode, setColumnsCollapsingAllowed, setContextMenuEnabled, setDefaultHeaderRow, setDetailsGenerator, setDetailsVisible, setEditorBuffered, setEditorCancelCaption, setEditorCrossFieldValidate, setEditorEnabled, setEditorSaveCaption, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setFooterRowHeight, setFooterVisible, setFrozenColumnCount, setHeaderRowHeight, setHeaderVisible, setItemClickAction, setMinHeight, setMinWidth, setRowDescriptionProvider, setRowDescriptionProvider, setSelectionMode, setSortable, setTextSelectionEnabled, sort
Methods inherited from interface io.jmix.ui.component.HasButtonsPanel
getButtonsPanel, setButtonsPanel
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasPagination
getPagination, setPagination
Methods inherited from interface io.jmix.ui.component.ListComponent
getSelected, getSingleSelected, isMultiSelect, setSelected, setSelected
Methods inherited from interface io.jmix.ui.component.LookupComponent
getLookupSelectedItems, setLookupSelectHandler
Methods inherited from interface io.jmix.ui.component.TreeDataGrid
collapse, collapseRecursively, expand, expandRecursively
-
Field Details
-
itemCollapseAllowedProvider
-
expandListener
protected com.vaadin.shared.Registration expandListener -
collapseListener
protected com.vaadin.shared.Registration collapseListener -
hierarchyColumn
-
-
Constructor Details
-
TreeDataGridImpl
public TreeDataGridImpl()
-
-
Method Details
-
createComponent
- Specified by:
createComponent
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
onColumnReorder
protected void onColumnReorder(com.vaadin.ui.Grid.ColumnReorderEvent e) - Overrides:
onColumnReorder
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
getLevel
Description copied from interface:TreeDataGrid
Returns the hierarchy level of an item.- Specified by:
getLevel
in interfaceTreeDataGrid<E>
- Parameters:
item
- the item to get level- Returns:
- the level of the given item
-
getItems
- Specified by:
getItems
in interfaceDataGrid<E>
- Specified by:
getItems
in interfaceListComponent<E>
- Specified by:
getItems
in interfaceTreeDataGrid<E>
- Overrides:
getItems
in classAbstractDataGrid<JmixTreeGrid<E>,
E> - Returns:
- The DataGrid source
-
getTreeDataGridItemsNN
-
setItems
Description copied from interface:DataGrid
Sets an instance ofDataGridItems
as the DataGrid data source.- Specified by:
setItems
in interfaceDataGrid<E>
- Overrides:
setItems
in classAbstractDataGrid<JmixTreeGrid<E>,
E> - Parameters:
dataGridItems
- the DataGrid data source
-
createEmptyDataProvider
- Overrides:
createEmptyDataProvider
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
initComponent
- Overrides:
initComponent
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
createDataGridDataProvider
- Overrides:
createDataGridDataProvider
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
editItemInternal
- Overrides:
editItemInternal
in classAbstractDataGrid<JmixTreeGrid<E>,
E>
-
getVisibleItemsConsideringHierarchy
-
isItemVisible
-
getItemCollapseAllowedProvider
- Specified by:
getItemCollapseAllowedProvider
in interfaceTreeDataGrid<E>
- Returns:
- the item collapse allowed provider
-
setItemCollapseAllowedProvider
Description copied from interface:TreeDataGrid
Sets the item collapse allowed provider for this TreeDataGrid. The provider should returntrue
for any item that the user can collapse.Note: This callback will be accessed often when sending data to the client. The callback should not do any costly operations.
- Specified by:
setItemCollapseAllowedProvider
in interfaceTreeDataGrid<E>
- Parameters:
provider
- the item collapse allowed provider, notnull
-
getHierarchyColumn
Description copied from interface:TreeDataGrid
Get the currently set hierarchy column. The hierarchy column is a column that displays the hierarchy of this DataGrid's data.- Specified by:
getHierarchyColumn
in interfaceTreeDataGrid<E>
- Returns:
- the currently set hierarchy column, or
null
if no column has been explicitly set
-
setHierarchyColumn
Description copied from interface:TreeDataGrid
Set the column that displays the hierarchy of this DataGrid's data. By default the hierarchy will be displayed in the first column.Setting a hierarchy column by calling this method also sets the column to be visible and not hidable.
Note: Changing the Renderer of the hierarchy column is not supported.
- Specified by:
setHierarchyColumn
in interfaceTreeDataGrid<E>
- Parameters:
id
- the column id to use for displaying hierarchy
-
setHierarchyColumn
Description copied from interface:TreeDataGrid
Set the column that displays the hierarchy of this DataGrid's data. By default the hierarchy will be displayed in the first column.Setting a hierarchy column by calling this method also sets the column to be visible and not hidable.
Note: Changing the Renderer of the hierarchy column is not supported.
- Specified by:
setHierarchyColumn
in interfaceTreeDataGrid<E>
- Parameters:
column
- the column to use for displaying hierarchy
-
setHierarchyColumnInternal
-
updateColumnCollapsible
-
expand
Description copied from interface:TreeDataGrid
Expands the given items.If an item is currently expanded, does nothing. If an item does not have any children, does nothing.
- Specified by:
expand
in interfaceTreeDataGrid<E>
- Parameters:
items
- the items to expand- See Also:
-
expandRecursively
Description copied from interface:TreeDataGrid
Expands the given items and their children recursively until the given depth.depth
describes the maximum distance between a given item and its descendant, meaning thatexpandRecursively(items, 0)
expands only the given items whileexpandRecursively(items, 2)
expands the given items as well as their children and grandchildren.This method will not fire events for expanded nodes.
- Specified by:
expandRecursively
in interfaceTreeDataGrid<E>
- Parameters:
items
- the items to expand recursivelydepth
- the maximum depth of recursion- See Also:
-
expandAll
public void expandAll()Description copied from interface:TreeDataGrid
Expands all items.This method will not fire events for expanded nodes.
- Specified by:
expandAll
in interfaceTreeDataGrid<E>
-
collapse
Description copied from interface:TreeDataGrid
Collapse the given items.For items that are already collapsed, does nothing.
- Specified by:
collapse
in interfaceTreeDataGrid<E>
- Parameters:
items
- the items to collapse- See Also:
-
collapseRecursively
Description copied from interface:TreeDataGrid
Collapse the given items and their children recursively until the given depth.depth
describes the maximum distance between a given item and its descendant, meaning thatcollapseRecursively(items, 0)
collapses only the given items whilecollapseRecursively(items, 2)
collapses the given items as well as their children and grandchildren.This method will not fire events for collapsed nodes.
- Specified by:
collapseRecursively
in interfaceTreeDataGrid<E>
- Parameters:
items
- the items to collapse recursivelydepth
- the maximum depth of recursion- See Also:
-
collapseAll
public void collapseAll()Description copied from interface:TreeDataGrid
Collapses all items.This method will not fire events for expanded nodes.
- Specified by:
collapseAll
in interfaceTreeDataGrid<E>
-
isExpanded
Description copied from interface:TreeDataGrid
Returns whether a given item is expanded or collapsed.- Specified by:
isExpanded
in interfaceTreeDataGrid<E>
- Parameters:
item
- the item to check- Returns:
true
if the item is expanded,false
otherwise
-
addExpandListener
Description copied from interface:TreeDataGrid
Registers a new expand listener.- Specified by:
addExpandListener
in interfaceTreeDataGrid<E>
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
onItemExpand
-
addCollapseListener
Description copied from interface:TreeDataGrid
Registers a new collapse listener.- Specified by:
addCollapseListener
in interfaceTreeDataGrid<E>
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
onItemCollapse
-
scrollTo
Description copied from interface:DataGrid
Scrolls to a certain item, using user-specified scroll destination.- Specified by:
scrollTo
in interfaceDataGrid<E>
- Overrides:
scrollTo
in classAbstractDataGrid<JmixTreeGrid<E>,
E> - Parameters:
item
- item to scroll todestination
- value specifying desired position of scrolled-to row- See Also:
-