Class ColumnsGrouper<E>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.groupgridflowui.component.columnsgrouper.ColumnsGrouper<E>
Type Parameters:
E - the type of the entity that is displayed in the GroupDataGrid
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

@CssImport("./src/columnsgrouper/jmix-columns-grouper.css") @JsModule("./src/columnsgrouper/jmix-columns-grouper-connector.js") public class ColumnsGrouper<E> extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout> implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
A component that allows to group columns in a GroupDataGrid. Represents a grouping panel that allows the users to group columns by dragging them to the grouping area.
See Also:
  • Field Details

    • BASE_CN

      public static final String BASE_CN
      See Also:
    • TITLE_SPAN_CN

      public static final String TITLE_SPAN_CN
      See Also:
    • DROP_HERE_SPAN_CN

      public static final String DROP_HERE_SPAN_CN
      See Also:
    • SEPARATOR_CN

      public static final String SEPARATOR_CN
      See Also:
    • GROUPING_BOX_CN

      public static final String GROUPING_BOX_CN
      See Also:
    • AVAILABLE_BOX_CN

      public static final String AVAILABLE_BOX_CN
      See Also:
    • CLEAR_ALL_CN

      public static final String CLEAR_ALL_CN
      See Also:
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • uiComponents

      protected UiComponents uiComponents
    • messages

      protected Messages messages
    • groupBySectionSpan

      protected com.vaadin.flow.component.html.Span groupBySectionSpan
    • dropHereSpan

      protected com.vaadin.flow.component.html.Span dropHereSpan
    • availableSectionSpan

      protected com.vaadin.flow.component.html.Span availableSectionSpan
    • groupingSeparator

      protected com.vaadin.flow.component.html.Hr groupingSeparator
    • clearAllButton

      protected com.vaadin.flow.component.button.Button clearAllButton
    • groupingColumnsBox

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout groupingColumnsBox
    • availableColumnsBox

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout availableColumnsBox
    • groupDataGrid

      protected GroupDataGrid<E> groupDataGrid
    • groupingItems

      protected List<ColumnsGrouperItem> groupingItems
    • itemsClickRegistrations

      protected Map<ColumnsGrouperItem,com.vaadin.flow.shared.Registration> itemsClickRegistrations
    • groupingChangedRegistration

      protected com.vaadin.flow.shared.Registration groupingChangedRegistration
  • Constructor Details

    • ColumnsGrouper

      public ColumnsGrouper()
  • Method Details

    • setApplicationContext

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

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • autowireDependencies

      protected void autowireDependencies()
    • initComponent

      protected void initComponent()
    • getGroupDataGrid

      @Nullable public GroupDataGrid<E> getGroupDataGrid()
      Returns:
      the GroupDataGrid that is managed by this component
    • setGroupDataGrid

      public void setGroupDataGrid(@Nullable GroupDataGrid<E> groupDataGrid)
      Sets a GroupDataGrid that should be managed by this component.
      Parameters:
      groupDataGrid - the GroupDataGrid
    • refresh

      public void refresh()
      Refreshes the displaying grouping columns and the available columns to group.
    • initContent

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()
      Overrides:
      initContent in class com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
    • initGroupBySectionSpan

      protected void initGroupBySectionSpan()
    • initAvailableSectionSpan

      protected void initAvailableSectionSpan()
    • initGroupingColumnsBox

      protected void initGroupingColumnsBox()
    • initClearAllButton

      protected void initClearAllButton()
    • initGroupingSeparator

      protected void initGroupingSeparator()
    • initAvailableColumnsBox

      protected void initAvailableColumnsBox()
    • updateGroupingItems

      protected void updateGroupingItems()
    • updateAvailableItems

      protected void updateAvailableItems()
    • updateClearAllButton

      protected void updateClearAllButton()
    • onColumnsGrouperItemActionButtonClick

      protected void onColumnsGrouperItemActionButtonClick(ColumnsGrouperItemButtonClickEvent event)
    • onDrop

      protected void onDrop(ColumnsGrouperDropEvent<E> event)
    • groupBy

      protected void groupBy(List<ColumnsGrouperItem> items)
    • createColumnsGrouperItem

      protected ColumnsGrouperItem createColumnsGrouperItem(Grid.Column<E> column)
    • refreshGroupingItems

      protected void refreshGroupingItems()
    • removeAllGroupingItems

      protected void removeAllGroupingItems()
    • removeGroupingItem

      protected void removeGroupingItem(ColumnsGrouperItem item)
    • unbindGroupDataGrid

      protected void unbindGroupDataGrid()
    • bindGroupDataGrid

      protected void bindGroupDataGrid(GroupDataGrid<E> groupDataGrid)
    • onGroupingChanged

      protected void onGroupingChanged(GroupingChangedEvent<E> event)
    • attachDropListener

      protected void attachDropListener()
    • initConnector

      protected void initConnector()
    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component