Package io.jmix.ui.component
Interface PropertyFilter<V>
- Type Parameters:
V
- value type
- All Superinterfaces:
Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,FilterComponent
,HasContextHelp
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasValue<V>
,Requirable
,SingleFilterComponent<V>
,SupportsCaptionPosition
,Validatable
- All Known Implementing Classes:
PropertyFilterImpl
@StudioComponent(caption="PropertyFilter",
category="Components",
xmlElement="propertyFilter",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/filter-components.html#property-filter",
canvasBehaviour=PROPERTY_FILTER,
icon="io/jmix/ui/icon/component/filter.svg")
public interface PropertyFilter<V>
extends SingleFilterComponent<V>
PropertyFilter is a UI component used for filtering entities returned by the
DataLoader
. The component is
related to entity property and can automatically render proper layout for setting a condition value. In general case
a PropertyFilter layout contains a label with entity property caption, operation label or selector (=, contains,
>, etc.) and a field for editing a property value.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Operation representing corresponding filtering condition.static class
Event sent when theoperation
property is changed.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.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is invoked when theoperation
property changes.boolean
boolean
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.void
setProperty
(String property) Sets related entity property name.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, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.FilterComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegated, setDataLoader
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
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, getParameterName, getValueComponent, isCaptionVisible, setCaptionVisible, setCaptionWidth, setParameterName, 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
-
NAME
- See Also:
-
-
Method Details
-
getQueryCondition
PropertyCondition getQueryCondition()- Specified by:
getQueryCondition
in interfaceFilterComponent
- Returns:
- a
PropertyCondition
related to the current property filter
-
getProperty
String getProperty()- Returns:
- related entity property name
-
setProperty
@StudioProperty(type=PROPERTY_PATH_REF, required=true, typeParameter="V") void setProperty(String property) Sets related entity property name.- Parameters:
property
- entity property name
-
getOperation
PropertyFilter.Operation getOperation()- Returns:
- a filtering operation
-
setOperation
Sets a filtering operation.- Parameters:
operation
- a filtering operation
-
isOperationEditable
boolean isOperationEditable()- Returns:
- whether an operation selector is visible.
-
setOperationEditable
Sets whether an operation selector is visible.- Parameters:
operationEditable
- whether an operation selector is visible
-
isOperationCaptionVisible
boolean isOperationCaptionVisible()- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
@StudioProperty(defaultValue="true") void setOperationCaptionVisible(boolean operationCaptionVisible) Sets whether to show operation caption.- Parameters:
operationCaptionVisible
- whether to show operation caption
-
addOperationChangeListener
Adds a listener that is invoked when theoperation
property changes.- Parameters:
listener
- a listener to add- Returns:
- a registration object for removing an event listener
-