public class GroupFilterImpl extends CompositeComponent<GroupBoxLayout> implements GroupFilter
CompositeComponent.CreateEvent
LogicalFilterComponent.Operation
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
SupportsCaptionPosition.CaptionPosition
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoApply |
protected java.lang.String |
caption |
protected SupportsCaptionPosition.CaptionPosition |
captionPosition |
protected int |
columnsCount |
protected boolean |
conditionModificationDelegated |
protected ResponsiveGridLayout |
conditionsLayout |
protected DataLoader |
dataLoader |
protected static java.lang.String |
GROUP_FILTER_STYLENAME |
protected io.jmix.core.querycondition.Condition |
initialDataLoaderCondition |
protected LogicalFilterSupport |
logicalFilterSupport |
protected LogicalFilterComponent.Operation |
operation |
protected boolean |
operationCaptionVisible |
protected java.util.List<FilterComponent> |
ownFilterComponentsOrder |
protected io.jmix.core.querycondition.LogicalCondition |
queryCondition |
protected UiComponents |
uiComponents |
applicationContext, frame, id, root
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
GroupFilterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(FilterComponent filterComponent)
Adds a
FilterComponent 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 ResponsiveGridLayout |
createConditionsLayout() |
protected ResponsiveGridLayout.Row |
createConditionsLayoutRow(ResponsiveGridLayout layout) |
protected ResponsiveGridLayout.Column |
createFilterComponentColumn(ResponsiveGridLayout.Row row) |
protected ResponsiveGridLayout.Column |
createLogicalFilterComponentColumn(ResponsiveGridLayout.Row row) |
protected GroupBoxLayout |
createRootComponent() |
java.lang.String |
getCaption() |
SupportsCaptionPosition.CaptionPosition |
getCaptionPosition() |
int |
getColumnsCount()
Returns the number of columns to be displayed on one row.
|
DataLoader |
getDataLoader() |
java.util.List<FilterComponent> |
getFilterComponents() |
LogicalFilterComponent.Operation |
getOperation() |
java.util.List<FilterComponent> |
getOwnFilterComponents() |
io.jmix.core.querycondition.LogicalCondition |
getQueryCondition() |
boolean |
isAutoApply() |
boolean |
isConditionModificationDelegated() |
boolean |
isOperationCaptionVisible() |
protected void |
onCreate(CompositeComponent.CreateEvent createEvent) |
void |
remove(FilterComponent filterComponent)
Removes a
FilterComponent from the component. |
void |
removeAll()
Removes all filter components from the component.
|
void |
setAutoApply(boolean autoApply)
Sets whether the filter component should be automatically applied to the
DataLoader when the value component value is changed. |
void |
setCaption(java.lang.String caption)
Sets the component's caption.
|
void |
setCaptionPosition(SupportsCaptionPosition.CaptionPosition position)
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 of
DataLoader condition is delegated to the owner
FilterComponent or Filter . |
void |
setDataLoader(DataLoader dataLoader)
Sets a
DataLoader related to the current filter component. |
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 |
updateCaption() |
protected void |
updateConditionsLayout() |
protected void |
updateDataLoaderCondition() |
protected void |
updateQueryCondition() |
addAttachListener, addCreateListener, addDetachListener, addStyleName, assignDebugId, attached, detached, disableEventListeners, enableEventListeners, getAlignment, getComposition, getCompositionOrNull, getDebugId, getEventHub, getFrame, getHeight, getHeightSizeUnit, getId, getInnerComponent, getInnerComponentOptional, getParent, getStyleName, getUiEventListeners, getWidth, getWidthSizeUnit, hasSubscriptions, isAttached, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, publish, removeStyleName, setAlignment, setApplicationContext, setComposition, setDebugId, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setId, setParent, setResponsive, setStyleName, setUiEventListeners, setVisible, setWidth, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
getFrame, setFrame
isCaptionAsHtml, setCaptionAsHtml
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected static final java.lang.String GROUP_FILTER_STYLENAME
protected UiComponents uiComponents
protected LogicalFilterSupport logicalFilterSupport
protected DataLoader dataLoader
protected io.jmix.core.querycondition.Condition initialDataLoaderCondition
protected boolean autoApply
protected boolean conditionModificationDelegated
protected int columnsCount
protected SupportsCaptionPosition.CaptionPosition captionPosition
protected java.lang.String caption
protected boolean operationCaptionVisible
protected LogicalFilterComponent.Operation operation
protected io.jmix.core.querycondition.LogicalCondition queryCondition
protected java.util.List<FilterComponent> ownFilterComponentsOrder
protected ResponsiveGridLayout conditionsLayout
@Autowired public void setUiComponents(UiComponents uiComponents)
@Autowired public void setUiComponentProperties(UiComponentProperties componentProperties)
@Autowired public void setLogicalFilterSupport(LogicalFilterSupport logicalFilterSupport)
public DataLoader getDataLoader()
getDataLoader
in interface FilterComponent
DataLoader
related to the current filter componentpublic void setDataLoader(DataLoader dataLoader)
FilterComponent
DataLoader
related to the current filter component.setDataLoader
in interface FilterComponent
dataLoader
- a DataLoader
to setpublic boolean isAutoApply()
isAutoApply
in interface FilterComponent
true
if the filter component should be automatically applied to
the DataLoader
when the value component value is changedpublic void setAutoApply(boolean autoApply)
FilterComponent
DataLoader
when the value component value is changed.setAutoApply
in interface FilterComponent
autoApply
- true
if the filter component should be automatically
applied to the DataLoader
when the value component
value is changedpublic boolean isConditionModificationDelegated()
isConditionModificationDelegated
in interface FilterComponent
true
if the filter component is located inside the Filter
or LogicalFilterComponent
and the modification of DataLoader
condition is delegated to the owner FilterComponent
or Filter
,
false
otherwisepublic void setConditionModificationDelegated(boolean conditionModificationDelegated)
FilterComponent
DataLoader
condition is delegated to the owner
FilterComponent
or Filter
.setConditionModificationDelegated
in interface FilterComponent
conditionModificationDelegated
- true
if the filter component is located inside
the Filter
or LogicalFilterComponent
and the modification of DataLoader
condition
is delegated to the owner FilterComponent
or Filter
,
false
otherwisepublic LogicalFilterComponent.Operation getOperation()
getOperation
in interface LogicalFilterComponent
public void setOperation(LogicalFilterComponent.Operation operation)
LogicalFilterComponent
setOperation
in interface LogicalFilterComponent
operation
- a filtering operationpublic int getColumnsCount()
GroupFilter
UiComponentProperties.getFilterColumnsCount()
.getColumnsCount
in interface GroupFilter
getColumnsCount
in interface SupportsColumnsCount
public void setColumnsCount(int columnsCount)
GroupFilter
UiComponentProperties.getFilterColumnsCount()
.setColumnsCount
in interface GroupFilter
setColumnsCount
in interface SupportsColumnsCount
columnsCount
- the number of columns to be displayed on one row@Nullable public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
getCaption
in interface CompositeWithCaption
public void setCaption(@Nullable java.lang.String caption)
Component.HasCaption
setCaption
in interface Component.HasCaption
setCaption
in interface CompositeWithCaption
caption
- the new component's captionpublic boolean isOperationCaptionVisible()
isOperationCaptionVisible
in interface LogicalFilterComponent
public void setOperationCaptionVisible(boolean operationCaptionVisible)
LogicalFilterComponent
setOperationCaptionVisible
in interface LogicalFilterComponent
operationCaptionVisible
- whether to show operation captionprotected void updateCaption()
public SupportsCaptionPosition.CaptionPosition getCaptionPosition()
getCaptionPosition
in interface GroupFilter
getCaptionPosition
in interface SupportsCaptionPosition
public void setCaptionPosition(SupportsCaptionPosition.CaptionPosition position)
GroupFilter
CaptionPosition#LEFT
- component captions will be placed
in a separate column on the left side of the componentsCaptionPosition#TOP
- component captions will be placed
above the componentssetCaptionPosition
in interface GroupFilter
setCaptionPosition
in interface SupportsCaptionPosition
position
- caption position of logical filter child componentspublic void add(FilterComponent filterComponent)
LogicalFilterComponent
FilterComponent
to the component. Updates the current LogicalCondition
by adding a Condition
from the FilterComponent
.add
in interface LogicalFilterComponent
filterComponent
- a FilterComponent
to addFilterComponent.getQueryCondition()
public void remove(FilterComponent filterComponent)
LogicalFilterComponent
FilterComponent
from the component. Updates the current LogicalCondition
.remove
in interface LogicalFilterComponent
filterComponent
- a FilterComponent
to removepublic void removeAll()
LogicalFilterComponent
LogicalCondition
.removeAll
in interface LogicalFilterComponent
public io.jmix.core.querycondition.LogicalCondition getQueryCondition()
getQueryCondition
in interface FilterComponent
getQueryCondition
in interface LogicalFilterComponent
LogicalCondition
related to the current componentpublic void apply()
FilterComponent
apply
in interface FilterComponent
public java.util.List<FilterComponent> getOwnFilterComponents()
getOwnFilterComponents
in interface LogicalFilterComponent
public java.util.List<FilterComponent> getFilterComponents()
getFilterComponents
in interface LogicalFilterComponent
protected void onCreate(CompositeComponent.CreateEvent createEvent)
protected GroupBoxLayout createRootComponent()
protected void updateQueryCondition()
protected void updateDataLoaderCondition()
protected void updateConditionsLayout()
protected ResponsiveGridLayout createConditionsLayout()
protected ResponsiveGridLayout.Row createConditionsLayoutRow(ResponsiveGridLayout layout)
protected void addLogicalFilterComponentToConditionsLayoutRow(LogicalFilterComponent logicalFilterComponent, ResponsiveGridLayout.Row row)
protected ResponsiveGridLayout.Column createLogicalFilterComponentColumn(ResponsiveGridLayout.Row row)
protected void addFilterComponentToConditionsLayoutRow(FilterComponent filterComponent, ResponsiveGridLayout.Row row)
protected ResponsiveGridLayout.Column createFilterComponentColumn(ResponsiveGridLayout.Row row)