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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An event fires when the current value of thePropertyFilter
is applied to the loader.static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected PropertyFilter.Operation
protected Object
static final String
static final String
static final String
static final String
static final String
static final String
protected DataGridHeaderFilter.HeaderFilterContext
protected JmixButton
protected com.vaadin.flow.component.Component
protected Messages
protected com.vaadin.flow.component.dialog.Dialog
protected PropertyFilter
protected PropertyFilterSupport
protected UiComponents
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
addApplyListener
(com.vaadin.flow.component.ComponentEventListener<DataGridHeaderFilter.ApplyEvent> eventListener) void
void
apply()
Applies the current value of thePropertyFilter
to the loaderprotected void
protected JmixButton
protected JmixButton
protected JmixButton
protected void
doCancel()
com.vaadin.flow.component.Component
protected String
protected void
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout
protected void
protected void
protected void
boolean
protected boolean
protected void
onApplyButtonClick
(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected void
onCancelButtonClick
(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected void
onClearButtonClick
(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected void
onFilterButtonClick
(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected void
onOpenOverlay
(com.vaadin.flow.component.dialog.Dialog.OpenedChangeEvent event) protected void
onOverlayClose
(com.vaadin.flow.component.dialog.Dialog.DialogCloseActionEvent event) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setHeader
(com.vaadin.flow.component.Component headerComponent) Sets a component to be displayed next to the filter button.void
Sets a text to be displayed next to the filter button.protected void
setupButtonFlexGrowStyle
(JmixButton button) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, 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.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
ATTRIBUTE_JMIX_ROLE_NAME
- See Also:
-
COLUMN_FILTER_BUTTON_ROLE
- See Also:
-
COLUMN_FILTER_POPUP_CLASSNAME
- See Also:
-
COLUMN_FILTER_DIALOG_CLASSNAME
- See Also:
-
COLUMN_FILTER_FOOTER_SMALL_CLASSNAME
- See Also:
-
COLUMN_FILTER_BUTTON_ACTIVATED_ATTRIBUTE_NAME
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
messages
-
propertyFilterSupport
-
context
-
filterButton
-
overlay
protected com.vaadin.flow.component.dialog.Dialog overlay -
propertyFilter
-
headerComponent
protected com.vaadin.flow.component.Component headerComponent -
appliedValue
-
appliedOperation
-
-
Constructor Details
-
DataGridHeaderFilter
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
autowireDependencies
protected void autowireDependencies() -
initComponent
protected void initComponent() -
initContent
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout initContent()- Overrides:
initContent
in classcom.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
-
setHeader
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
- Returns:
PropertyFilter
witch is displayed in the overlay
-
isFilterApplied
public boolean isFilterApplied()- Returns:
true
if thePropertyFilter
component is applied to theDataLoader
,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
-
onApplyButtonClick
protected void onApplyButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
createCancelButton
-
onCancelButtonClick
protected void onCancelButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
setupButtonFlexGrowStyle
-
apply
public void apply()Applies the current value of thePropertyFilter
to the loader -
doCancel
protected void doCancel() -
createClearFilterButton
-
onClearButtonClick
protected void onClearButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
getOverlayPositionExpression
-
isSmallDevice
protected boolean isSmallDevice() -
addApplyListener
public com.vaadin.flow.shared.Registration addApplyListener(com.vaadin.flow.component.ComponentEventListener<DataGridHeaderFilter.ApplyEvent> eventListener)
-