Class GroupDataGridHeaderGrouper

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
io.jmix.groupgridflowui.component.headergrouper.GroupDataGridHeaderGrouper
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/headergrouper/jmix-header-grouper.css") public class GroupDataGridHeaderGrouper extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout> implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
A UI component used for displaying a button for managing grouping columns in the header of GroupDataGridColumn in GroupDataGrid. The button opens a pop-up with a ColumnsGrouper component.
See Also:
  • Field Details

    • ATTRIBUTE_JMIX_ROLE_NAME

      public static final String ATTRIBUTE_JMIX_ROLE_NAME
      See Also:
    • GROUPER_BUTTON_ROLE

      public static final String GROUPER_BUTTON_ROLE
      See Also:
    • GROUPER_POPOVER_CN

      public static final String GROUPER_POPOVER_CN
      See Also:
    • GROUP_ICON_CN

      public static final String GROUP_ICON_CN
      See Also:
    • GROUPER_BUTTON_ID_SUFFIX

      protected static final String GROUPER_BUTTON_ID_SUFFIX
      See Also:
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • uiComponents

      protected UiComponents uiComponents
    • groupDataGrid

      protected GroupDataGrid<?> groupDataGrid
    • column

      protected Grid.Column<?> column
    • grouperButton

      protected JmixButton grouperButton
    • defaultGroupIcon

      protected com.vaadin.flow.component.icon.SvgIcon defaultGroupIcon
    • groupIcon

      protected com.vaadin.flow.component.Component groupIcon
    • groupingPopover

      protected com.vaadin.flow.component.popover.Popover groupingPopover
    • columnsGrouper

      protected ColumnsGrouper<?> columnsGrouper
    • internalHeaderComponent

      protected com.vaadin.flow.component.Component internalHeaderComponent
    • headerComponent

      protected com.vaadin.flow.component.Component headerComponent
    • headerText

      protected String headerText
  • Constructor Details

    • GroupDataGridHeaderGrouper

      public GroupDataGridHeaderGrouper()
  • 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
    • initContent

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

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

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

      @Nullable public Grid.Column<?> getColumn()
      Returns:
      the column associated with this header or null if not set
    • setColumn

      public void setColumn(@Nullable Grid.Column<?> column)
      Sets the column associated with this header.
      Parameters:
      column - the column
    • setHeader

      public void setHeader(String labelText)
      Sets a text to be displayed next to the grouper button.
      Parameters:
      labelText - the text to be shown
    • setHeader

      public void setHeader(@Nullable com.vaadin.flow.component.Component headerComponent)
      Sets a component to be displayed next to the grouper button.
      Parameters:
      headerComponent - the component to be shown
    • getHeaderComponent

      @Nullable public com.vaadin.flow.component.Component getHeaderComponent()
      Returns:
      the column header component except the grouping button
    • getHeaderText

      @Nullable public String getHeaderText()
    • getGroupIcon

      @Deprecated(since="2.8", forRemoval=true) @Nullable public com.vaadin.flow.component.icon.Icon getGroupIcon()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the icon for the grouper button or null if the default icon is used
    • setGroupIcon

      @Deprecated(since="2.8", forRemoval=true) public void setGroupIcon(@Nullable com.vaadin.flow.component.icon.Icon icon)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the icon for the grouper button.
      Parameters:
      icon - the icon to set or null to use the default icon
    • getGroupIconComponent

      @Nullable public com.vaadin.flow.component.Component getGroupIconComponent()
      Returns:
      the icon for the grouper button or null if the default icon is used
    • setGroupIconComponent

      public void setGroupIconComponent(@Nullable com.vaadin.flow.component.Component icon)
      Sets the icon for the grouper button.
      Parameters:
      icon - the icon to set or null to use the default icon
    • isDisplayColumnsGrouperOnIconClick

      public boolean isDisplayColumnsGrouperOnIconClick()
    • setDisplayColumnsGrouperOnIconClick

      public void setDisplayColumnsGrouperOnIconClick(boolean displayOnIconClick)
    • refreshHeader

      public void refreshHeader()
      Refreshes the header.
    • initDefaultGroupIcon

      protected void initDefaultGroupIcon()
    • initGrouperButton

      protected void initGrouperButton()
    • initPopover

      protected void initPopover()
    • initColumnsGrouper

      protected void initColumnsGrouper()
    • updateGrouperButtonId

      protected void updateGrouperButtonId()
    • setHeaderInternal

      protected void setHeaderInternal(@Nullable com.vaadin.flow.component.Component headerComponent)
    • getGroupDataGridIndex

      protected int getGroupDataGridIndex(com.vaadin.flow.component.Component component, GroupDataGrid<?> groupDataGrid)
    • onAttach

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