Package io.jmix.ui.component.impl
Class PropertyFilterImpl<V>
java.lang.Object
io.jmix.ui.component.CompositeComponent<HBoxLayout>
io.jmix.ui.component.impl.AbstractSingleFilterComponent<V>
io.jmix.ui.component.impl.PropertyFilterImpl<V>
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,CompositeWithCaption
,CompositeWithDescription
,CompositeWithHtmlCaption
,CompositeWithHtmlDescription
,FilterComponent
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasValue<V>
,PropertyFilter<V>
,Requirable
,SingleFilterComponent<V>
,SupportsCaptionPosition
,Validatable
public class PropertyFilterImpl<V>
extends AbstractSingleFilterComponent<V>
implements PropertyFilter<V>
-
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.HasValue
HasValue.ValueChangeEvent<V>
Nested classes/interfaces inherited from interface io.jmix.ui.component.PropertyFilter
PropertyFilter.Operation, PropertyFilter.OperationChangeEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition
-
Field Summary
Modifier and TypeFieldDescriptionprotected PropertyFilter.Operation
protected boolean
protected boolean
protected PopupButton
protected static final String
protected PropertyFilterSupport
protected SingleFilterSupport
Fields inherited from class io.jmix.ui.component.impl.AbstractSingleFilterComponent
autoApply, caption, captionLabel, captionPosition, captionVisible, captionWidth, conditionModificationDelegated, dataLoader, icon, queryCondition, TRUNCATED_CAPTION_STYLENAME, uiComponents, valueComponent
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.PropertyFilter
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is invoked when theoperation
property changes.protected PopupButton
protected PropertyCondition
protected String
getOperationCaption
(PropertyFilter.Operation operation) protected void
initOperationSelectorActions
(PopupButton operationSelector) protected void
initRootComponent
(HBoxLayout root) boolean
boolean
protected void
void
setDataLoader
(DataLoader dataLoader) Sets aDataLoader
related to the current filter component.void
setOperation
(PropertyFilter.Operation operation) Sets a filtering operation.void
setOperationCaptionVisible
(boolean operationCaptionVisible) Sets whether to show operation caption.void
setOperationEditable
(boolean operationEditable) Sets whether an operation selector is visible.protected void
setOperationInternal
(PropertyFilter.Operation operation) void
setParameterName
(String parameterName) Sets the name of the associated query parameter name.void
setProperty
(String property) Sets related entity property name.void
setPropertyFilterSupport
(PropertyFilterSupport propertyFilterSupport) void
setSingleFilterSupport
(SingleFilterSupport singleFilterSupport) void
setTabIndex
(int tabIndex) Sets the tabulator index of theFocusable
component.protected void
updateCaption
(String caption) protected void
protected void
updateQueryCondition
(V newValue) Methods inherited from class io.jmix.ui.component.impl.AbstractSingleFilterComponent
addValueChangeListener, apply, checkValueComponentState, createCaptionLabel, createRootComponent, focus, getCaption, getCaptionPosition, getCaptionWidth, getCaptionWidthSizeUnit, getChildAlignment, getContextHelpIconClickHandler, getContextHelpText, getDataLoader, getIcon, getIconName, getRequiredMessage, getTabIndex, getValue, getValueComponent, initValueComponent, isAutoApply, isCaptionVisible, isConditionModificationDelegated, isContextHelpTextHtmlEnabled, isEditable, isRequired, isValid, onCreate, onValueChanged, setAutoApply, setCaption, setCaptionAsHtml, setCaptionPosition, setCaptionVisible, setCaptionWidth, setConditionModificationDelegated, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setEditable, setIcon, setIconFromSet, setRequired, setRequiredMessage, setUiComponentProperties, setUiComponents, setupLoaderFirstResult, setValue, setValueComponent, setWidth, updateCaptionLabelTruncation, updateCaptionLayout, updateDataLoaderCondition, updateIcon, validate
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, setFrame, setHeight, setHtmlSanitizerEnabled, setId, setParent, setResponsive, setStyleName, setUiEventListeners, setVisible, 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, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.CompositeWithDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.CompositeWithHtmlCaption
isCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.CompositeWithHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.FilterComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegated
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.SingleFilterComponent
getCaptionWidth, getCaptionWidthSizeUnit, getValueComponent, isCaptionVisible, setCaptionVisible, setCaptionWidth, setValueComponent
Methods inherited from interface io.jmix.ui.component.SupportsCaptionPosition
getCaptionPosition, setCaptionPosition
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
PROPERTY_FILTER_STYLENAME
- See Also:
-
propertyFilterSupport
-
singleFilterSupport
-
operationSelector
-
operation
-
operationEditable
protected boolean operationEditable -
operationCaptionVisible
protected boolean operationCaptionVisible
-
-
Constructor Details
-
PropertyFilterImpl
public PropertyFilterImpl()
-
-
Method Details
-
setPropertyFilterSupport
-
setSingleFilterSupport
-
initRootComponent
- Overrides:
initRootComponent
in classAbstractSingleFilterComponent<V>
-
getInnerComponentPrefix
- Specified by:
getInnerComponentPrefix
in classAbstractSingleFilterComponent<V>
-
createOperationSelector
-
initOperationSelectorActions
-
getOperationCaption
-
setDataLoader
Description copied from interface:FilterComponent
Sets aDataLoader
related to the current filter component.- Specified by:
setDataLoader
in interfaceFilterComponent
- Overrides:
setDataLoader
in classAbstractSingleFilterComponent<V>
- Parameters:
dataLoader
- aDataLoader
to set
-
getProperty
- Specified by:
getProperty
in interfacePropertyFilter<V>
- Returns:
- related entity property name
-
setProperty
Description copied from interface:PropertyFilter
Sets related entity property name.- Specified by:
setProperty
in interfacePropertyFilter<V>
- Parameters:
property
- entity property name
-
getOperation
- Specified by:
getOperation
in interfacePropertyFilter<V>
- Returns:
- a filtering operation
-
setOperation
Description copied from interface:PropertyFilter
Sets a filtering operation.- Specified by:
setOperation
in interfacePropertyFilter<V>
- Parameters:
operation
- a filtering operation
-
setOperationInternal
-
getParameterName
- Specified by:
getParameterName
in interfaceSingleFilterComponent<V>
- Returns:
- the name of the associated query parameter name
-
setParameterName
Description copied from interface:SingleFilterComponent
Sets the name of the associated query parameter name.- Specified by:
setParameterName
in interfaceSingleFilterComponent<V>
- Parameters:
parameterName
- a name of the associated query parameter name
-
updateChildAlignment
protected void updateChildAlignment()- Overrides:
updateChildAlignment
in classAbstractSingleFilterComponent<V>
-
createQueryCondition
- Specified by:
createQueryCondition
in classAbstractSingleFilterComponent<V>
-
getQueryCondition
- Specified by:
getQueryCondition
in interfaceFilterComponent
- Specified by:
getQueryCondition
in interfacePropertyFilter<V>
- Overrides:
getQueryCondition
in classAbstractSingleFilterComponent<V>
- Returns:
- a
Condition
related to the current filter component
-
updateQueryCondition
- Specified by:
updateQueryCondition
in classAbstractSingleFilterComponent<V>
-
addOperationChangeListener
public Subscription addOperationChangeListener(Consumer<PropertyFilter.OperationChangeEvent> listener) Description copied from interface:PropertyFilter
Adds a listener that is invoked when theoperation
property changes.- Specified by:
addOperationChangeListener
in interfacePropertyFilter<V>
- Parameters:
listener
- a listener to add- Returns:
- a registration object for removing an event listener
-
isOperationEditable
public boolean isOperationEditable()- Specified by:
isOperationEditable
in interfacePropertyFilter<V>
- Returns:
- whether an operation selector is visible.
-
setOperationEditable
public void setOperationEditable(boolean operationEditable) Description copied from interface:PropertyFilter
Sets whether an operation selector is visible.- Specified by:
setOperationEditable
in interfacePropertyFilter<V>
- Parameters:
operationEditable
- whether an operation selector is visible
-
isOperationCaptionVisible
public boolean isOperationCaptionVisible()- Specified by:
isOperationCaptionVisible
in interfacePropertyFilter<V>
- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
public void setOperationCaptionVisible(boolean operationCaptionVisible) Description copied from interface:PropertyFilter
Sets whether to show operation caption.- Specified by:
setOperationCaptionVisible
in interfacePropertyFilter<V>
- Parameters:
operationCaptionVisible
- whether to show operation caption
-
updateCaption
- Overrides:
updateCaption
in classAbstractSingleFilterComponent<V>
-
removeOperationSelector
protected void removeOperationSelector() -
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
component. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.- Specified by:
setTabIndex
in interfaceComponent.Focusable
- Overrides:
setTabIndex
in classAbstractSingleFilterComponent<V>
- Parameters:
tabIndex
- tab index
-