Class DataGridHeaderFilter

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
io.jmix.flowui.component.grid.headerfilter.DataGridHeaderFilter
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

public class DataGridHeaderFilter 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 the filter in the column header. Modifies the standard header by adding a button to open a pop-up overlay with a PropertyFilter.
See Also:
  • Field Details

  • Constructor Details

  • 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
    • autowireDependencies

      protected void autowireDependencies()
    • initComponent

      protected void initComponent()
    • initContent

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

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

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

      @Nullable public com.vaadin.flow.component.Component getHeader()
      Returns:
      the column header component except the filter button
    • getPropertyFilter

      public PropertyFilter<?> getPropertyFilter()
      Returns:
      PropertyFilter witch is displayed in the overlay
    • isFilterApplied

      public boolean isFilterApplied()
      Returns:
      true if the PropertyFilter component is applied to the DataLoader, false otherwise
    • initFunnelButton

      protected void initFunnelButton()
    • onFilterButtonClick

      protected void onFilterButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • initOverlay

      protected void initOverlay()
    • initPropertyFilter

      protected void initPropertyFilter()
    • onOpenOverlay

      protected void onOpenOverlay(com.vaadin.flow.component.dialog.Dialog.OpenedChangeEvent event)
    • onOverlayClose

      protected void onOverlayClose(com.vaadin.flow.component.dialog.Dialog.DialogCloseActionEvent event)
    • createApplyButton

      protected JmixButton createApplyButton()
    • onApplyButtonClick

      protected void onApplyButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • createCancelButton

      protected JmixButton createCancelButton()
    • onCancelButtonClick

      protected void onCancelButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • setupButtonFlexGrowStyle

      protected void setupButtonFlexGrowStyle(JmixButton button)
    • apply

      public void apply()
      Applies the current value of the PropertyFilter to the loader
    • doCancel

      protected void doCancel()
    • createClearFilterButton

      protected JmixButton createClearFilterButton()
    • onClearButtonClick

      protected void onClearButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • getOverlayPositionExpression

      protected String getOverlayPositionExpression()
    • isSmallDevice

      protected boolean isSmallDevice()
    • addApplyListener

      public com.vaadin.flow.shared.Registration addApplyListener(com.vaadin.flow.component.ComponentEventListener<DataGridHeaderFilter.ApplyEvent> eventListener)