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.CreateEvent
Nested 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.LogicalFilterComponent
LogicalFilterComponent.Operation
Nested classes/interfaces inherited from interface io.jmix.ui.component.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected String
protected SupportsCaptionPosition.CaptionPosition
protected int
protected boolean
protected ResponsiveGridLayout
protected DataLoader
protected static final String
protected Condition
protected LogicalFilterSupport
protected LogicalFilterComponent.Operation
protected boolean
protected List<FilterComponent>
protected LogicalCondition
protected UiComponents
Fields inherited from class io.jmix.ui.component.CompositeComponent
applicationContext, frame, id, prefixId, root
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.GroupFilter
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(FilterComponent filterComponent) Adds aFilterComponent
to the component.protected void
addFilterComponentToConditionsLayoutRow
(FilterComponent filterComponent, ResponsiveGridLayout.Row row) protected void
addLogicalFilterComponentToConditionsLayoutRow
(LogicalFilterComponent logicalFilterComponent, ResponsiveGridLayout.Row row) void
apply()
Applies the current filter component condition.protected void
attachToFrame
(Component childComponent) protected ResponsiveGridLayout
protected ResponsiveGridLayout.Row
protected ResponsiveGridLayout.Column
protected ResponsiveGridLayout.Column
protected GroupBoxLayout
int
Returns the number of columns to be displayed on one row.boolean
boolean
boolean
protected void
onCreate
(CompositeComponent.CreateEvent createEvent) void
remove
(FilterComponent filterComponent) Removes aFilterComponent
from the component.void
Removes all filter components from the component.void
setAutoApply
(boolean autoApply) Sets whether the filter component should be automatically applied to theDataLoader
when the value component value is changed.void
setCaption
(String caption) Sets the component's caption.void
Sets caption position of logical filter child components.void
setColumnsCount
(int columnsCount) Sets the number of columns to be displayed on one row.void
setConditionModificationDelegated
(boolean conditionModificationDelegated) Sets whether the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orFilter
.void
setDataLoader
(DataLoader dataLoader) Sets aDataLoader
related to the current filter component.void
void
setLogicalFilterSupport
(LogicalFilterSupport logicalFilterSupport) void
setOperation
(LogicalFilterComponent.Operation operation) Sets a filtering operation.void
setOperationCaptionVisible
(boolean operationCaptionVisible) Sets whether to show operation caption.void
setUiComponentProperties
(UiComponentProperties componentProperties) void
setUiComponents
(UiComponents uiComponents) protected void
protected void
protected void
protected void
Methods 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, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame
Methods inherited from interface io.jmix.ui.component.CompositeWithContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.CompositeWithDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.CompositeWithHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.CompositeWithHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.CompositeWithIcon
getIcon, setIcon, setIconFromSet
Methods 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 -
operationCaptionVisible
protected boolean operationCaptionVisible -
operation
-
queryCondition
-
ownFilterComponentsOrder
-
conditionsLayout
-
-
Constructor Details
-
GroupFilterImpl
public GroupFilterImpl()
-
-
Method Details
-
setUiComponents
-
setUiComponentProperties
-
setLogicalFilterSupport
-
getDataLoader
- Specified by:
getDataLoader
in interfaceFilterComponent
- Returns:
- a
DataLoader
related to the current filter component
-
setDataLoader
Description copied from interface:FilterComponent
Sets aDataLoader
related to the current filter component.- Specified by:
setDataLoader
in interfaceFilterComponent
- Parameters:
dataLoader
- aDataLoader
to set
-
isAutoApply
public boolean isAutoApply()- Specified by:
isAutoApply
in interfaceFilterComponent
- Returns:
true
if the filter component should be automatically applied to theDataLoader
when the value component value is changed
-
setAutoApply
public void setAutoApply(boolean autoApply) Description copied from interface:FilterComponent
Sets whether the filter component should be automatically applied to theDataLoader
when the value component value is changed.- Specified by:
setAutoApply
in interfaceFilterComponent
- Parameters:
autoApply
-true
if the filter component should be automatically applied to theDataLoader
when the value component value is changed
-
isConditionModificationDelegated
public boolean isConditionModificationDelegated()- Specified by:
isConditionModificationDelegated
in interfaceFilterComponent
- Returns:
true
if the filter component is located inside theFilter
orLogicalFilterComponent
and the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orFilter
,false
otherwise
-
setConditionModificationDelegated
public void setConditionModificationDelegated(boolean conditionModificationDelegated) Description copied from interface:FilterComponent
Sets whether the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orFilter
.- Specified by:
setConditionModificationDelegated
in interfaceFilterComponent
- Parameters:
conditionModificationDelegated
-true
if the filter component is located inside theFilter
orLogicalFilterComponent
and the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orFilter
,false
otherwise
-
getOperation
- Specified by:
getOperation
in interfaceLogicalFilterComponent
- Returns:
- a filtering operation
-
setOperation
Description copied from interface:LogicalFilterComponent
Sets a filtering operation.- Specified by:
setOperation
in interfaceLogicalFilterComponent
- Parameters:
operation
- a filtering operation
-
getColumnsCount
public int getColumnsCount()Description copied from interface:GroupFilter
Returns the number of columns to be displayed on one row. The default value is taken fromUiComponentProperties.getFilterColumnsCount()
.- Specified by:
getColumnsCount
in interfaceGroupFilter
- Specified by:
getColumnsCount
in interfaceSupportsColumnsCount
- Returns:
- the number of columns to be displayed on one row
-
setColumnsCount
public void setColumnsCount(int columnsCount) Description copied from interface:GroupFilter
Sets the number of columns to be displayed on one row. The default value is taken fromUiComponentProperties.getFilterColumnsCount()
.- Specified by:
setColumnsCount
in interfaceGroupFilter
- Specified by:
setColumnsCount
in interfaceSupportsColumnsCount
- Parameters:
columnsCount
- the number of columns to be displayed on one row
-
getCaption
- Specified by:
getCaption
in interfaceComponent.HasCaption
- Specified by:
getCaption
in interfaceCompositeWithCaption
- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Specified by:
setCaption
in interfaceCompositeWithCaption
- Parameters:
caption
- the new component's caption
-
isOperationCaptionVisible
public boolean isOperationCaptionVisible()- Specified by:
isOperationCaptionVisible
in interfaceLogicalFilterComponent
- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
public void setOperationCaptionVisible(boolean operationCaptionVisible) Description copied from interface:LogicalFilterComponent
Sets whether to show operation caption.- Specified by:
setOperationCaptionVisible
in interfaceLogicalFilterComponent
- Parameters:
operationCaptionVisible
- whether to show operation caption
-
updateCaption
protected void updateCaption() -
getCaptionPosition
- Specified by:
getCaptionPosition
in interfaceGroupFilter
- Specified by:
getCaptionPosition
in interfaceSupportsCaptionPosition
- Returns:
- caption position of logical filter child components
-
setCaptionPosition
Description copied from interface:GroupFilter
Sets 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:
setCaptionPosition
in interfaceGroupFilter
- Specified by:
setCaptionPosition
in interfaceSupportsCaptionPosition
- Parameters:
position
- caption position of logical filter child components
-
add
Description copied from interface:LogicalFilterComponent
Adds aFilterComponent
to the component. Updates the currentLogicalCondition
by adding aCondition
from theFilterComponent
.- Specified by:
add
in interfaceLogicalFilterComponent
- Parameters:
filterComponent
- aFilterComponent
to add- See Also:
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classCompositeComponent<GroupBoxLayout>
-
attachToFrame
-
remove
Description copied from interface:LogicalFilterComponent
Removes aFilterComponent
from the component. Updates the currentLogicalCondition
.- Specified by:
remove
in interfaceLogicalFilterComponent
- Parameters:
filterComponent
- aFilterComponent
to remove
-
removeAll
public void removeAll()Description copied from interface:LogicalFilterComponent
Removes all filter components from the component. Resets the currentLogicalCondition
.- Specified by:
removeAll
in interfaceLogicalFilterComponent
-
getQueryCondition
- Specified by:
getQueryCondition
in interfaceFilterComponent
- Specified by:
getQueryCondition
in interfaceLogicalFilterComponent
- Returns:
- a
LogicalCondition
related to the current component
-
apply
public void apply()Description copied from interface:FilterComponent
Applies the current filter component condition.- Specified by:
apply
in interfaceFilterComponent
-
getOwnFilterComponents
- Specified by:
getOwnFilterComponents
in interfaceLogicalFilterComponent
- Returns:
- the list of filter components directly owned by the current component
-
getFilterComponents
- Specified by:
getFilterComponents
in 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
-