Package io.jmix.ui.component.impl
Class GroupFilterImpl
- All Implemented Interfaces:
AttachNotifier,Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,CompositeWithCaption,CompositeWithContextHelp,CompositeWithDescription,CompositeWithHtmlCaption,CompositeWithHtmlDescription,CompositeWithIcon,FilterComponent,GroupFilter,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,LogicalFilterComponent,SupportsCaptionPosition,SupportsColumnsCount
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.CompositeComponent
CompositeComponent.CreateEventNested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.LogicalFilterComponent
LogicalFilterComponent.OperationNested classes/interfaces inherited from interface io.jmix.ui.component.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected SupportsCaptionPosition.CaptionPositionprotected intprotected booleanprotected ResponsiveGridLayoutprotected DataLoaderprotected static final Stringprotected Conditionprotected LogicalFilterSupportprotected LogicalFilterComponent.Operationprotected booleanprotected List<FilterComponent>protected LogicalConditionprotected UiComponentsFields inherited from class io.jmix.ui.component.CompositeComponent
applicationContext, frame, id, prefixId, rootFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.GroupFilter
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(FilterComponent filterComponent) Adds aFilterComponentto the component.protected voidaddFilterComponentToConditionsLayoutRow(FilterComponent filterComponent, ResponsiveGridLayout.Row row) protected voidaddLogicalFilterComponentToConditionsLayoutRow(LogicalFilterComponent logicalFilterComponent, ResponsiveGridLayout.Row row) voidapply()Applies the current filter component condition.protected voidattachToFrame(Component childComponent) protected ResponsiveGridLayoutprotected ResponsiveGridLayout.Rowprotected ResponsiveGridLayout.Columnprotected ResponsiveGridLayout.Columnprotected GroupBoxLayoutintReturns the number of columns to be displayed on one row.booleanbooleanbooleanprotected voidonCreate(CompositeComponent.CreateEvent createEvent) voidremove(FilterComponent filterComponent) Removes aFilterComponentfrom the component.voidRemoves all filter components from the component.voidsetAutoApply(boolean autoApply) Sets whether the filter component should be automatically applied to theDataLoaderwhen the value component value is changed.voidsetCaption(String caption) Sets the component's caption.voidSets caption position of logical filter child components.voidsetColumnsCount(int columnsCount) Sets the number of columns to be displayed on one row.voidsetConditionModificationDelegated(boolean conditionModificationDelegated) Sets whether the modification ofDataLoadercondition is delegated to the ownerFilterComponentorFilter.voidsetDataLoader(DataLoader dataLoader) Sets aDataLoaderrelated to the current filter component.voidvoidsetLogicalFilterSupport(LogicalFilterSupport logicalFilterSupport) voidsetOperation(LogicalFilterComponent.Operation operation) Sets a filtering operation.voidsetOperationCaptionVisible(boolean operationCaptionVisible) Sets whether to show operation caption.voidsetUiComponentProperties(UiComponentProperties componentProperties) voidsetUiComponents(UiComponents uiComponents) protected voidprotected voidprotected voidprotected voidMethods inherited from class io.jmix.ui.component.CompositeComponent
addAttachListener, addCreateListener, addDetachListener, addStyleName, assignDebugId, attached, detached, disableEventListeners, enableEventListeners, getAlignment, getComposition, getCompositionOrNull, getDebugId, getEventHub, getFrame, getFullId, getHeight, getHeightSizeUnit, getId, getInnerComponent, getInnerComponentOptional, getParent, getPrefixId, getStyleName, getUiEventListeners, getWidth, getWidthSizeUnit, hasSubscriptions, isAttached, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, publish, removeStyleName, setAlignment, setApplicationContext, setComposition, setDebugId, setEnabled, setHeight, setHtmlSanitizerEnabled, setId, setParent, setResponsive, setStyleName, setUiEventListeners, setVisible, setWidth, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, updateComponentIds, updateIdIfNeeded, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrameMethods inherited from interface io.jmix.ui.component.CompositeWithContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.CompositeWithDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.CompositeWithHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.CompositeWithHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.CompositeWithIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
GROUP_FILTER_STYLENAME
- See Also:
-
uiComponents
-
logicalFilterSupport
-
dataLoader
-
initialDataLoaderCondition
-
autoApply
protected boolean autoApply -
conditionModificationDelegated
protected boolean conditionModificationDelegated -
columnsCount
protected int columnsCount -
captionPosition
-
caption
-
operationCaptionVisible
protected boolean operationCaptionVisible -
operation
-
queryCondition
-
ownFilterComponentsOrder
-
conditionsLayout
-
-
Constructor Details
-
GroupFilterImpl
public GroupFilterImpl()
-
-
Method Details
-
setUiComponents
-
setUiComponentProperties
-
setLogicalFilterSupport
-
getDataLoader
- Specified by:
getDataLoaderin interfaceFilterComponent- Returns:
- a
DataLoaderrelated to the current filter component
-
setDataLoader
Description copied from interface:FilterComponentSets aDataLoaderrelated to the current filter component.- Specified by:
setDataLoaderin interfaceFilterComponent- Parameters:
dataLoader- aDataLoaderto set
-
isAutoApply
public boolean isAutoApply()- Specified by:
isAutoApplyin interfaceFilterComponent- Returns:
trueif the filter component should be automatically applied to theDataLoaderwhen the value component value is changed
-
setAutoApply
public void setAutoApply(boolean autoApply) Description copied from interface:FilterComponentSets whether the filter component should be automatically applied to theDataLoaderwhen the value component value is changed.- Specified by:
setAutoApplyin interfaceFilterComponent- Parameters:
autoApply-trueif the filter component should be automatically applied to theDataLoaderwhen the value component value is changed
-
isConditionModificationDelegated
public boolean isConditionModificationDelegated()- Specified by:
isConditionModificationDelegatedin interfaceFilterComponent- Returns:
trueif the filter component is located inside theFilterorLogicalFilterComponentand the modification ofDataLoadercondition is delegated to the ownerFilterComponentorFilter,falseotherwise
-
setConditionModificationDelegated
public void setConditionModificationDelegated(boolean conditionModificationDelegated) Description copied from interface:FilterComponentSets whether the modification ofDataLoadercondition is delegated to the ownerFilterComponentorFilter.- Specified by:
setConditionModificationDelegatedin interfaceFilterComponent- Parameters:
conditionModificationDelegated-trueif the filter component is located inside theFilterorLogicalFilterComponentand the modification ofDataLoadercondition is delegated to the ownerFilterComponentorFilter,falseotherwise
-
getOperation
- Specified by:
getOperationin interfaceLogicalFilterComponent- Returns:
- a filtering operation
-
setOperation
Description copied from interface:LogicalFilterComponentSets a filtering operation.- Specified by:
setOperationin interfaceLogicalFilterComponent- Parameters:
operation- a filtering operation
-
getColumnsCount
public int getColumnsCount()Description copied from interface:GroupFilterReturns the number of columns to be displayed on one row. The default value is taken fromUiComponentProperties.getFilterColumnsCount().- Specified by:
getColumnsCountin interfaceGroupFilter- Specified by:
getColumnsCountin interfaceSupportsColumnsCount- Returns:
- the number of columns to be displayed on one row
-
setColumnsCount
public void setColumnsCount(int columnsCount) Description copied from interface:GroupFilterSets the number of columns to be displayed on one row. The default value is taken fromUiComponentProperties.getFilterColumnsCount().- Specified by:
setColumnsCountin interfaceGroupFilter- Specified by:
setColumnsCountin interfaceSupportsColumnsCount- Parameters:
columnsCount- the number of columns to be displayed on one row
-
getCaption
- Specified by:
getCaptionin interfaceComponent.HasCaption- Specified by:
getCaptionin interfaceCompositeWithCaption- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaptionSets the component's caption.- Specified by:
setCaptionin interfaceComponent.HasCaption- Specified by:
setCaptionin interfaceCompositeWithCaption- Parameters:
caption- the new component's caption
-
isOperationCaptionVisible
public boolean isOperationCaptionVisible()- Specified by:
isOperationCaptionVisiblein interfaceLogicalFilterComponent- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
public void setOperationCaptionVisible(boolean operationCaptionVisible) Description copied from interface:LogicalFilterComponentSets whether to show operation caption.- Specified by:
setOperationCaptionVisiblein interfaceLogicalFilterComponent- Parameters:
operationCaptionVisible- whether to show operation caption
-
updateCaption
protected void updateCaption() -
getCaptionPosition
- Specified by:
getCaptionPositionin interfaceGroupFilter- Specified by:
getCaptionPositionin interfaceSupportsCaptionPosition- Returns:
- caption position of logical filter child components
-
setCaptionPosition
Description copied from interface:GroupFilterSets caption position of logical filter child components.SupportsCaptionPosition.CaptionPosition.LEFT- component captions will be placed in a separate column on the left side of the componentsSupportsCaptionPosition.CaptionPosition.TOP- component captions will be placed above the components
- Specified by:
setCaptionPositionin interfaceGroupFilter- Specified by:
setCaptionPositionin interfaceSupportsCaptionPosition- Parameters:
position- caption position of logical filter child components
-
add
Description copied from interface:LogicalFilterComponentAdds aFilterComponentto the component. Updates the currentLogicalConditionby adding aConditionfrom theFilterComponent.- Specified by:
addin interfaceLogicalFilterComponent- Parameters:
filterComponent- aFilterComponentto add- See Also:
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classCompositeComponent<GroupBoxLayout>
-
attachToFrame
-
remove
Description copied from interface:LogicalFilterComponentRemoves aFilterComponentfrom the component. Updates the currentLogicalCondition.- Specified by:
removein interfaceLogicalFilterComponent- Parameters:
filterComponent- aFilterComponentto remove
-
removeAll
public void removeAll()Description copied from interface:LogicalFilterComponentRemoves all filter components from the component. Resets the currentLogicalCondition.- Specified by:
removeAllin interfaceLogicalFilterComponent
-
getQueryCondition
- Specified by:
getQueryConditionin interfaceFilterComponent- Specified by:
getQueryConditionin interfaceLogicalFilterComponent- Returns:
- a
LogicalConditionrelated to the current component
-
apply
public void apply()Description copied from interface:FilterComponentApplies the current filter component condition.- Specified by:
applyin interfaceFilterComponent
-
getOwnFilterComponents
- Specified by:
getOwnFilterComponentsin interfaceLogicalFilterComponent- Returns:
- the list of filter components directly owned by the current component
-
getFilterComponents
- Specified by:
getFilterComponentsin interfaceLogicalFilterComponent- Returns:
- the list of filter components belonging to the whole components tree below this component
-
onCreate
-
createRootComponent
-
updateQueryCondition
protected void updateQueryCondition() -
updateDataLoaderCondition
protected void updateDataLoaderCondition() -
updateConditionsLayout
protected void updateConditionsLayout() -
createConditionsLayout
-
createConditionsLayoutRow
-
addLogicalFilterComponentToConditionsLayoutRow
protected void addLogicalFilterComponentToConditionsLayoutRow(LogicalFilterComponent logicalFilterComponent, ResponsiveGridLayout.Row row) -
createLogicalFilterComponentColumn
protected ResponsiveGridLayout.Column createLogicalFilterComponentColumn(ResponsiveGridLayout.Row row) -
addFilterComponentToConditionsLayoutRow
protected void addFilterComponentToConditionsLayoutRow(FilterComponent filterComponent, ResponsiveGridLayout.Row row) -
createFilterComponentColumn
-