Class TreeDataGrid<E>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<T>
com.vaadin.flow.component.treegrid.TreeGrid<T>
io.jmix.flowui.kit.component.grid.JmixTreeGrid<E>
io.jmix.flowui.component.grid.TreeDataGrid<E>
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<E>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.grid.Grid<E>>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.grid.Grid<E>>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.data.event.SortEvent.SortNotifier<com.vaadin.flow.component.grid.Grid<E>,com.vaadin.flow.component.grid.GridSortOrder<E>>, com.vaadin.flow.data.provider.HasDataGenerators<E>, com.vaadin.flow.data.provider.HasDataView<E,Void,com.vaadin.flow.component.grid.dataview.GridDataView<E>>, com.vaadin.flow.data.provider.HasLazyDataView<E,Void,com.vaadin.flow.component.grid.dataview.GridLazyDataView<E>>, com.vaadin.flow.data.provider.HasListDataView<E,com.vaadin.flow.component.grid.dataview.GridListDataView<E>>, com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider<E>, EnhancedDataGrid<E>, EnhancedTreeDataGrid<E>, ListDataComponent<E>, LookupComponent<E>, LookupComponent.MultiSelectLookupComponent<E>, SupportsEnterPress<TreeDataGrid<E>>, HasActions, HasSubParts, SelectionChangeNotifier<com.vaadin.flow.component.grid.Grid<E>,E>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class TreeDataGrid<E> extends JmixTreeGrid<E> implements ListDataComponent<E>, LookupComponent.MultiSelectLookupComponent<E>, EnhancedTreeDataGrid<E>, SupportsEnterPress<TreeDataGrid<E>>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid

    com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T extends Object>, com.vaadin.flow.component.grid.Grid.Column<T extends Object>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T extends Object,U extends com.vaadin.flow.data.provider.ArrayUpdater>, com.vaadin.flow.component.grid.Grid.MultiSortPriority, com.vaadin.flow.component.grid.Grid.NestedNullBehavior, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.UpdateQueue

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface io.jmix.flowui.component.grid.EnhancedDataGrid

    EnhancedDataGrid.AggregationPosition

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface io.jmix.flowui.component.LookupComponent

    LookupComponent.MultiSelectLookupComponent<T>

    Nested classes/interfaces inherited from interface io.jmix.flowui.component.SupportsEnterPress

    SupportsEnterPress.EnterPressEvent<C extends com.vaadin.flow.component.Component>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
     
    protected boolean
     
     

    Fields inherited from class io.jmix.flowui.kit.component.grid.JmixTreeGrid

    actionsSupport
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAggregation(com.vaadin.flow.component.grid.Grid.Column<E> column, AggregationInfo info)
    Add an aggregation info in order to perform aggregation for column.
    addColumn(com.vaadin.flow.data.renderer.Renderer<E> renderer)
     
    addColumn(com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
     
    <V extends Comparable<? super V>>
    DataGridColumn<E>
    addColumn(com.vaadin.flow.function.ValueProvider<E,V> valueProvider, String... sortingProperties)
     
    addColumn(MetaPropertyPath metaPropertyPath)
    Adds column by the meta property path.
    addColumn(String propertyName)
     
    addColumn(String key, MetaPropertyPath metaPropertyPath)
    Adds column by the meta property path and specified key.
    <V extends com.vaadin.flow.component.Component>
    DataGridColumn<E>
    addComponentColumn(com.vaadin.flow.function.ValueProvider<E,V> componentProvider)
     
    <V extends com.vaadin.flow.component.Component>
    DataGridColumn<E>
    addComponentHierarchyColumn(com.vaadin.flow.function.ValueProvider<E,V> componentProvider)
     
    com.vaadin.flow.component.grid.contextmenu.GridContextMenu<E>
     
    addHierarchyColumn(com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
     
    Adds hierarchy column by the meta property path.
    addHierarchyColumn(String key, MetaPropertyPath metaPropertyPath)
    Adds hierarchy column by the meta property path and specified key.
    com.vaadin.flow.shared.Registration
    addItemDoubleClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.grid.ItemDoubleClickEvent<E>> listener)
     
    com.vaadin.flow.shared.Registration
    addSelectionListener(com.vaadin.flow.data.selection.SelectionListener<com.vaadin.flow.component.grid.Grid<E>,E> listener)
     
    void
     
     
     
    protected DataGridEditor<E>
     
    void
    deselect(E item)
     
    void
    Deselects all selected rows.
    void
     
     
    Map<com.vaadin.flow.component.grid.Grid.Column<E>,Object>
     
    List<com.vaadin.flow.component.grid.Grid.Column<E>>
    Gets an unmodifiable list of all currently added Grid.Columns including hidden by security.
     
    getColumnMetaPropertyPath(com.vaadin.flow.component.grid.Grid.Column<E> column)
     
    List<com.vaadin.flow.component.grid.Grid.Column<E>>
    Note: If column reordering is enabled with Grid.setColumnReorderingAllowed(boolean) and the user has reordered the columns, the order of the list returned by this method might be incorrect.
     
    protected BiFunction<com.vaadin.flow.data.renderer.Renderer<E>,String,com.vaadin.flow.component.grid.Grid.Column<E>>
     
     
     
    Returns a set of items corresponding to the selected rows of this component.
    Returns an item corresponding to the selected row of this component.
     
    protected void
     
    boolean
     
    boolean
     
    boolean
     
    protected void
     
    protected void
     
    void
    removeColumn(com.vaadin.flow.component.grid.Grid.Column<E> column)
     
    void
    select(E item)
    Selects a row of this component for a given item.
    void
    Selects the rows of this component for a given collection of items.
    void
    setAggregatable(boolean aggregatable)
    Set to true if aggregation should be enabled.
    void
    Sets aggregation row position.
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
    setColumnPosition(com.vaadin.flow.component.grid.Grid.Column<E> column, int index)
    Moves column to a provided position in the DataGrid.
    setColumns(String hierarchyPropertyName, com.vaadin.flow.function.ValueProvider<E,?> valueProvider, Collection<String> propertyNames)
     
    void
    setDataProvider(com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<E,?> dataProvider)
     
    void
    Sets code to execute when Enter key is pressed.
    setHierarchyColumn(String propertyName)
     
    setHierarchyColumn(String propertyName, com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
     
    void
    setMultiSelect(boolean multiSelect)
     
    com.vaadin.flow.component.grid.GridSelectionModel<E>
    setSelectionMode(com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
     

    Methods inherited from class io.jmix.flowui.kit.component.grid.JmixTreeGrid

    addAction, addAction, getAction, getActions, getActionsSupport, removeAction

    Methods inherited from class com.vaadin.flow.component.treegrid.TreeGrid

    addCollapseListener, addExpandListener, collapse, collapse, collapse, collapseRecursively, collapseRecursively, createDefaultArrayUpdater, expand, expand, expand, expandRecursively, expandRecursively, getDataCommunicator, getDataProvider, getGenericDataView, getItemsWithChildrenRecursively, getLazyDataView, getListDataView, isExpanded, scrollToEnd, scrollToIndex, scrollToIndex, setDataProvider, setItems, setItems, setItems, setItems, setItems, setUniqueKeyDataGenerator

    Methods inherited from class com.vaadin.flow.component.grid.Grid

    addCellFocusListener, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addItemClickListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, configureBeanType, createColumn, createColumnId, createSortingComparator, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnLayers, getColumnRendering, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getFooterRows, getHeaderRows, getNestedNullBehavior, getPageSize, getPartNameGenerator, getPropertySet, getSelectionModel, getSortOrder, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, onAttach, onDetach, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeColumnByKey, removeColumnLayer, removeColumns, removeThemeVariants, scrollToStart, setAllRowsVisible, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumnReorderingAllowed, setColumns, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setItemDetailsRenderer, setItems, setItems, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionModel, setSortableColumns, setTooltipGenerator, setUniqueKeyProperty, setUniqueKeyProvider, sort, updateSelectionModeOnClient

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface io.jmix.flowui.kit.component.HasActions

    removeAction, removeAllActions

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider

    getTreeData, setItems, setItems, setTreeData

    Methods inherited from interface com.vaadin.flow.data.provider.HasLazyDataView

    setItems

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • gridDelegate

      protected TreeGridDelegate<E,TreeDataGridItems<E>> gridDelegate
    • contextMenu

      protected JmixGridContextMenu<E> contextMenu
    • editorCreated

      protected boolean editorCreated
  • Constructor Details

    • TreeDataGrid

      public TreeDataGrid()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • initComponent

      protected void initComponent()
    • createDelegate

      protected TreeGridDelegate<E,TreeDataGridItems<E>> createDelegate()
    • setDataProvider

      public void setDataProvider(com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<E,?> dataProvider)
      Specified by:
      setDataProvider in interface com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider<E>
      Overrides:
      setDataProvider in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • getSingleSelectedItem

      @Nullable public E getSingleSelectedItem()
      Description copied from interface: ListDataComponent
      Returns an item corresponding to the selected row of this component. If nothing is selected, the method returns null. If multiple selection mode is enabled, returns the first selected instance.
      Specified by:
      getSingleSelectedItem in interface ListDataComponent<E>
      Returns:
      an item corresponding to the selected row of this component
    • getSelectedItems

      public Set<E> getSelectedItems()
      Description copied from interface: ListDataComponent
      Returns a set of items corresponding to the selected rows of this component. If nothing is selected, the method returns a Collections.emptySet().
      Specified by:
      getSelectedItems in interface ListDataComponent<E>
      Specified by:
      getSelectedItems in interface LookupComponent<E>
      Overrides:
      getSelectedItems in class com.vaadin.flow.component.grid.Grid<E>
      Returns:
      a set of item instances corresponding to the selected rows of this component, never null
    • select

      public void select(E item)
      Description copied from interface: ListDataComponent
      Selects a row of this component for a given item.
      Specified by:
      select in interface ListDataComponent<E>
      Overrides:
      select in class com.vaadin.flow.component.grid.Grid<E>
      Parameters:
      item - item instance to select the row
    • select

      public void select(Collection<E> items)
      Description copied from interface: ListDataComponent
      Selects the rows of this component for a given collection of items.
      Specified by:
      select in interface ListDataComponent<E>
      Parameters:
      items - collection of items to select rows
    • deselect

      public void deselect(E item)
      Specified by:
      deselect in interface ListDataComponent<E>
      Overrides:
      deselect in class com.vaadin.flow.component.grid.Grid<E>
    • deselectAll

      public void deselectAll()
      Description copied from interface: ListDataComponent
      Deselects all selected rows.
      Specified by:
      deselectAll in interface ListDataComponent<E>
      Overrides:
      deselectAll in class com.vaadin.flow.component.grid.Grid<E>
    • getItems

      @Nullable public TreeDataGridItems<E> getItems()
      Specified by:
      getItems in interface ListDataComponent<E>
      Returns:
      a data unit that holds component items
    • isMultiSelect

      public boolean isMultiSelect()
      Specified by:
      isMultiSelect in interface ListDataComponent<E>
      Returns:
      true if multiple selection mode is enabled
    • addSelectionListener

      public com.vaadin.flow.shared.Registration addSelectionListener(com.vaadin.flow.data.selection.SelectionListener<com.vaadin.flow.component.grid.Grid<E>,E> listener)
      Specified by:
      addSelectionListener in interface SelectionChangeNotifier<com.vaadin.flow.component.grid.Grid<E>,E>
      Overrides:
      addSelectionListener in class com.vaadin.flow.component.grid.Grid<E>
    • addItemDoubleClickListener

      public com.vaadin.flow.shared.Registration addItemDoubleClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.grid.ItemDoubleClickEvent<E>> listener)
      Overrides:
      addItemDoubleClickListener in class com.vaadin.flow.component.grid.Grid<E>
    • setEnterPressHandler

      public void setEnterPressHandler(@Nullable Consumer<SupportsEnterPress.EnterPressEvent<TreeDataGrid<E>>> handler)
      Sets code to execute when Enter key is pressed.

      If such code is not set, this component responds to Enter press by attempting to find and execute the following actions:

      If one of these actions is found and enabled, it is executed.

      Note: if no explicit double click listeners are added, then the above rule is used to handle double clicks on this component.

      Specified by:
      setEnterPressHandler in interface SupportsEnterPress<E>
      Parameters:
      handler - code to execute when Enter key is pressed or null to remove previously set.
      See Also:
      • Grid.addItemDoubleClickListener(ComponentEventListener)
    • enableMultiSelect

      public void enableMultiSelect()
      Specified by:
      enableMultiSelect in interface LookupComponent.MultiSelectLookupComponent<E>
    • setMultiSelect

      public void setMultiSelect(boolean multiSelect)
      Specified by:
      setMultiSelect in interface LookupComponent.MultiSelectLookupComponent<E>
    • setSelectionMode

      public com.vaadin.flow.component.grid.GridSelectionModel<E> setSelectionMode(com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
      Overrides:
      setSelectionMode in class com.vaadin.flow.component.grid.Grid<E>
    • getDefaultColumnFactory

      protected BiFunction<com.vaadin.flow.data.renderer.Renderer<E>,String,com.vaadin.flow.component.grid.Grid.Column<E>> getDefaultColumnFactory()
      Overrides:
      getDefaultColumnFactory in class com.vaadin.flow.component.grid.Grid<E>
    • getColumnMetaPropertyPath

      @Nullable public MetaPropertyPath getColumnMetaPropertyPath(com.vaadin.flow.component.grid.Grid.Column<E> column)
      Specified by:
      getColumnMetaPropertyPath in interface EnhancedDataGrid<E>
    • addColumn

      public DataGridColumn<E> addColumn(MetaPropertyPath metaPropertyPath)
      Adds column by the meta property path.
      Specified by:
      addColumn in interface EnhancedDataGrid<E>
      Parameters:
      metaPropertyPath - meta property path to add column
      Returns:
      added column
    • addColumn

      public DataGridColumn<E> addColumn(String key, MetaPropertyPath metaPropertyPath)
      Adds column by the meta property path and specified key. The key is used to identify the column, see getColumnByKey(String).
      Specified by:
      addColumn in interface EnhancedDataGrid<E>
      Parameters:
      key - column key
      metaPropertyPath - meta property path to add column
      Returns:
      added column
    • addHierarchyColumn

      public DataGridColumn<E> addHierarchyColumn(MetaPropertyPath metaPropertyPath)
      Description copied from interface: EnhancedTreeDataGrid
      Adds hierarchy column by the meta property path. see getColumnByKey(String).
      Specified by:
      addHierarchyColumn in interface EnhancedTreeDataGrid<E>
      Parameters:
      metaPropertyPath - meta property path to add column
      Returns:
      added column
    • addHierarchyColumn

      public DataGridColumn<E> addHierarchyColumn(String key, MetaPropertyPath metaPropertyPath)
      Description copied from interface: EnhancedTreeDataGrid
      Adds hierarchy column by the meta property path and specified key. The key is used to identify the column, see getColumnByKey(String).
      Specified by:
      addHierarchyColumn in interface EnhancedTreeDataGrid<E>
      Parameters:
      key - column key
      metaPropertyPath - meta property path to add column
      Returns:
      added column
    • addColumn

      public DataGridColumn<E> addColumn(com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<E>
    • addColumn

      public DataGridColumn<E> addColumn(com.vaadin.flow.data.renderer.Renderer<E> renderer)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<E>
    • getColumnByKey

      @Nullable public DataGridColumn<E> getColumnByKey(String columnKey)
      Overrides:
      getColumnByKey in class com.vaadin.flow.component.grid.Grid<E>
    • addHierarchyColumn

      public DataGridColumn<E> addHierarchyColumn(com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
      Overrides:
      addHierarchyColumn in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • addComponentColumn

      public <V extends com.vaadin.flow.component.Component> DataGridColumn<E> addComponentColumn(com.vaadin.flow.function.ValueProvider<E,V> componentProvider)
      Overrides:
      addComponentColumn in class com.vaadin.flow.component.grid.Grid<E>
    • addColumn

      public <V extends Comparable<? super V>> DataGridColumn<E> addColumn(com.vaadin.flow.function.ValueProvider<E,V> valueProvider, String... sortingProperties)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<E>
    • addColumn

      public DataGridColumn<E> addColumn(String propertyName)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<E>
    • addComponentHierarchyColumn

      public <V extends com.vaadin.flow.component.Component> DataGridColumn<E> addComponentHierarchyColumn(com.vaadin.flow.function.ValueProvider<E,V> componentProvider)
      Overrides:
      addComponentHierarchyColumn in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • setHierarchyColumn

      public DataGridColumn<E> setHierarchyColumn(String propertyName)
      Overrides:
      setHierarchyColumn in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • setHierarchyColumn

      public DataGridColumn<E> setHierarchyColumn(String propertyName, com.vaadin.flow.function.ValueProvider<E,?> valueProvider)
      Overrides:
      setHierarchyColumn in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • setColumns

      public DataGridColumn<E> setColumns(String hierarchyPropertyName, com.vaadin.flow.function.ValueProvider<E,?> valueProvider, Collection<String> propertyNames)
      Overrides:
      setColumns in class com.vaadin.flow.component.treegrid.TreeGrid<E>
    • removeColumn

      public void removeColumn(com.vaadin.flow.component.grid.Grid.Column<E> column)
      Overrides:
      removeColumn in class com.vaadin.flow.component.grid.Grid<E>
    • isAggregatable

      public boolean isAggregatable()
      Specified by:
      isAggregatable in interface EnhancedDataGrid<E>
      Returns:
      true if DataGrid is aggregatable
    • setAggregatable

      public void setAggregatable(boolean aggregatable)
      Description copied from interface: EnhancedDataGrid
      Set to true if aggregation should be enabled. Default value is false.
      Specified by:
      setAggregatable in interface EnhancedDataGrid<E>
      Parameters:
      aggregatable - whether to aggregate DataGrid columns
    • getAggregationPosition

      public EnhancedDataGrid.AggregationPosition getAggregationPosition()
      Specified by:
      getAggregationPosition in interface EnhancedDataGrid<E>
      Returns:
      return aggregation row position
    • setAggregationPosition

      public void setAggregationPosition(EnhancedDataGrid.AggregationPosition aggregationPosition)
      Description copied from interface: EnhancedDataGrid
      Sets aggregation row position. Default value is EnhancedDataGrid.AggregationPosition.BOTTOM.
      Specified by:
      setAggregationPosition in interface EnhancedDataGrid<E>
      Parameters:
      aggregationPosition - position: EnhancedDataGrid.AggregationPosition.TOP or EnhancedDataGrid.AggregationPosition.BOTTOM
    • addAggregation

      public void addAggregation(com.vaadin.flow.component.grid.Grid.Column<E> column, AggregationInfo info)
      Description copied from interface: EnhancedDataGrid
      Add an aggregation info in order to perform aggregation for column.
      Specified by:
      addAggregation in interface EnhancedDataGrid<E>
      Parameters:
      column - column for aggregation
      info - aggregation info
      See Also:
    • getAggregationResults

      public Map<com.vaadin.flow.component.grid.Grid.Column<E>,Object> getAggregationResults()
      Specified by:
      getAggregationResults in interface EnhancedDataGrid<E>
      Returns:
      aggregated values for columns
    • getColumns

      public List<com.vaadin.flow.component.grid.Grid.Column<E>> getColumns()
      Note: If column reordering is enabled with Grid.setColumnReorderingAllowed(boolean) and the user has reordered the columns, the order of the list returned by this method might be incorrect.
      Overrides:
      getColumns in class com.vaadin.flow.component.grid.Grid<E>
      Returns:
      an unmodifiable list of Grid.Columns that are not hidden by security
    • getAllColumns

      public List<com.vaadin.flow.component.grid.Grid.Column<E>> getAllColumns()
      Gets an unmodifiable list of all currently added Grid.Columns including hidden by security.

      If column reordering is enabled with Grid.setColumnReorderingAllowed(boolean) and the user has reordered the columns, the order of the returned list will be correct.

      Returns:
      a copy of all currently added Grid.Columns including hidden by security
    • setColumnPosition

      public void setColumnPosition(com.vaadin.flow.component.grid.Grid.Column<E> column, int index)
      Moves column to a provided position in the DataGrid.
      Parameters:
      column - column to move
      index - new index of column in getAllColumns() list
    • isEditorCreated

      public boolean isEditorCreated()
      Specified by:
      isEditorCreated in interface EnhancedDataGrid<E>
    • onDataProviderChange

      protected void onDataProviderChange()
      Overrides:
      onDataProviderChange in class com.vaadin.flow.component.grid.Grid<E>
    • getEditor

      public DataGridEditor<E> getEditor()
      Overrides:
      getEditor in class com.vaadin.flow.component.grid.Grid<E>
    • createEditor

      protected DataGridEditor<E> createEditor()
      Overrides:
      createEditor in class com.vaadin.flow.component.grid.Grid<E>
    • createActionsSupport

      protected GridActionsSupport<JmixTreeGrid<E>,E> createActionsSupport()
      Overrides:
      createActionsSupport in class JmixTreeGrid<E>
    • onAfterApplyColumnSecurity

      protected void onAfterApplyColumnSecurity(AbstractGridDelegate.ColumnSecurityContext<E> context)
    • getContextMenu

      public JmixGridContextMenu<E> getContextMenu()
      Specified by:
      getContextMenu in interface EnhancedDataGrid<E>
      Returns:
      context menu instance attached to the grid
    • addContextMenu

      public com.vaadin.flow.component.grid.contextmenu.GridContextMenu<E> addContextMenu()
      Overrides:
      addContextMenu in class com.vaadin.flow.component.grid.Grid<E>
    • getSubPart

      @Nullable public Object getSubPart(String name)
      Specified by:
      getSubPart in interface HasSubParts
      Overrides:
      getSubPart in class JmixTreeGrid<E>