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 theGroupDataGrid
- 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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextstatic final Stringprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected com.vaadin.flow.component.html.Spanstatic final Stringstatic final Stringprotected com.vaadin.flow.component.button.Buttonstatic final Stringprotected com.vaadin.flow.component.html.Spanprotected com.vaadin.flow.component.html.Spanprotected GroupDataGrid<E>static final Stringprotected com.vaadin.flow.shared.Registrationprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected List<ColumnsGrouperItem>protected com.vaadin.flow.component.html.Hrprotected Map<ColumnsGrouperItem,com.vaadin.flow.shared.Registration> protected Messagesstatic final Stringstatic final Stringprotected UiComponents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidprotected voidprotected voidbindGroupDataGrid(GroupDataGrid<E> groupDataGrid) protected ColumnsGrouperItemcreateColumnsGrouperItem(Grid.Column<E> column) protected voidgroupBy(List<ColumnsGrouperItem> items) protected voidprotected voidprotected voidprotected voidprotected voidprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected voidprotected voidprotected voidprotected voidonAttach(com.vaadin.flow.component.AttachEvent attachEvent) protected voidprotected voidonDrop(ColumnsGrouperDropEvent<E> event) protected voidonGroupingChanged(GroupingChangedEvent<E> event) voidrefresh()Refreshes the displaying grouping columns and the available columns to group.protected voidprotected voidprotected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetGroupDataGrid(GroupDataGrid<E> groupDataGrid) Sets aGroupDataGridthat should be managed by this component.protected voidprotected voidprotected voidprotected voidMethods 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, 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
-
BASE_CN
- See Also:
-
TITLE_SPAN_CN
- See Also:
-
DROP_HERE_SPAN_CN
- See Also:
-
SEPARATOR_CN
- See Also:
-
GROUPING_BOX_CN
- See Also:
-
AVAILABLE_BOX_CN
- See Also:
-
CLEAR_ALL_CN
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
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
-
groupingItems
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
autowireDependencies
protected void autowireDependencies() -
initComponent
protected void initComponent() -
getGroupDataGrid
- Returns:
- the
GroupDataGridthat is managed by this component
-
setGroupDataGrid
Sets aGroupDataGridthat should be managed by this component.- Parameters:
groupDataGrid- theGroupDataGrid
-
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:
initContentin classcom.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
-
onDrop
-
groupBy
-
createColumnsGrouperItem
-
refreshGroupingItems
protected void refreshGroupingItems() -
removeAllGroupingItems
protected void removeAllGroupingItems() -
removeGroupingItem
-
unbindGroupDataGrid
protected void unbindGroupDataGrid() -
bindGroupDataGrid
-
onGroupingChanged
-
attachDropListener
protected void attachDropListener() -
initConnector
protected void initConnector() -
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
onAttachin classcom.vaadin.flow.component.Component
-