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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextstatic final Stringprotected ColumnsGrouper<?>protected com.vaadin.flow.component.icon.SvgIconstatic final Stringprotected GroupDataGrid<?>protected static final Stringstatic final Stringstatic final Stringprotected JmixButtonprotected com.vaadin.flow.component.icon.Iconprotected com.vaadin.flow.component.popover.Popoverprotected com.vaadin.flow.component.Componentprotected Stringprotected com.vaadin.flow.component.Componentprotected UiComponents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcom.vaadin.flow.component.icon.Iconcom.vaadin.flow.component.Componentprotected voidprotected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected voidprotected voidprotected voidbooleanvoidRefreshes the header.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetDisplayColumnsGrouperOnIconClick(boolean displayOnIconClick) voidsetGroupDataGrid(GroupDataGrid<?> groupDataGrid) Sets aGroupDataGridthat should be managed by this component.voidsetGroupIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon for the grouper button.voidsetHeader(com.vaadin.flow.component.Component headerComponent) Sets a component to be displayed next to the grouper button.voidSets a text to be displayed next to the grouper button.protected voidsetHeaderInternal(com.vaadin.flow.component.Component headerComponent) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods 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:
-
GROUPER_BUTTON_ROLE
- See Also:
-
GROUPER_POPOVER_CN
- See Also:
-
GROUP_ICON_CN
- See Also:
-
GROUPER_BUTTON_ID
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
groupDataGrid
-
grouperButton
-
defaultGroupIcon
protected com.vaadin.flow.component.icon.SvgIcon defaultGroupIcon -
groupIcon
protected com.vaadin.flow.component.icon.Icon groupIcon -
groupingPopover
protected com.vaadin.flow.component.popover.Popover groupingPopover -
columnsGrouper
-
internalHeaderComponent
protected com.vaadin.flow.component.Component internalHeaderComponent -
headerComponent
protected com.vaadin.flow.component.Component headerComponent -
headerText
-
-
Constructor Details
-
GroupDataGridHeaderGrouper
public GroupDataGridHeaderGrouper()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
initContent
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout initContent()- Overrides:
initContentin classcom.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
-
getGroupDataGrid
- Returns:
- the
GroupDataGridthat is managed by this component
-
setGroupDataGrid
Sets aGroupDataGridthat should be managed by this component.- Parameters:
groupDataGrid- theGroupDataGrid
-
setHeader
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
-
getGroupIcon
@Nullable public com.vaadin.flow.component.icon.Icon getGroupIcon()- Returns:
- the icon for the grouper button or
nullif the default icon is used
-
setGroupIcon
public void setGroupIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Sets the icon for the grouper button.- Parameters:
icon- the icon to set ornullto 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() -
setHeaderInternal
protected void setHeaderInternal(@Nullable com.vaadin.flow.component.Component headerComponent)
-