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 ClassesNested 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.HasValue
HasValue.ValueChangeEvent<V>Nested classes/interfaces inherited from interface io.jmix.ui.component.PropertyFilter
PropertyFilter.Operation, PropertyFilter.OperationChangeEventNested classes/interfaces inherited from interface io.jmix.ui.component.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyFilter.Operationprotected booleanprotected booleanprotected PopupButtonprotected static final Stringprotected PropertyFilterSupportprotected SingleFilterSupportFields inherited from class io.jmix.ui.component.impl.AbstractSingleFilterComponent
autoApply, caption, captionLabel, captionPosition, captionVisible, captionWidth, conditionModificationDelegated, dataLoader, icon, queryCondition, TRUNCATED_CAPTION_STYLENAME, uiComponents, valueComponentFields 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.PropertyFilter
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is invoked when theoperationproperty changes.protected PopupButtonprotected PropertyConditionprotected StringgetOperationCaption(PropertyFilter.Operation operation) protected voidinitOperationSelectorActions(PopupButton operationSelector) protected voidinitRootComponent(HBoxLayout root) booleanbooleanprotected voidvoidsetDataLoader(DataLoader dataLoader) Sets aDataLoaderrelated to the current filter component.voidsetOperation(PropertyFilter.Operation operation) Sets a filtering operation.voidsetOperationCaptionVisible(boolean operationCaptionVisible) Sets whether to show operation caption.voidsetOperationEditable(boolean operationEditable) Sets whether an operation selector is visible.protected voidsetOperationInternal(PropertyFilter.Operation operation) voidsetParameterName(String parameterName) Sets the name of the associated query parameter name.voidsetProperty(String property) Sets related entity property name.voidsetPropertyFilterSupport(PropertyFilterSupport propertyFilterSupport) voidsetSingleFilterSupport(SingleFilterSupport singleFilterSupport) voidsetTabIndex(int tabIndex) Sets the tabulator index of theFocusablecomponent.protected voidupdateCaption(String caption) protected voidprotected voidupdateQueryCondition(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, validateMethods 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, 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
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusableMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.CompositeWithDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.CompositeWithHtmlCaption
isCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.CompositeWithHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.FilterComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegatedMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods inherited from interface io.jmix.ui.component.SingleFilterComponent
getCaptionWidth, getCaptionWidthSizeUnit, getValueComponent, isCaptionVisible, setCaptionVisible, setCaptionWidth, setValueComponentMethods inherited from interface io.jmix.ui.component.SupportsCaptionPosition
getCaptionPosition, setCaptionPositionMethods 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:
initRootComponentin classAbstractSingleFilterComponent<V>
-
getInnerComponentPrefix
- Specified by:
getInnerComponentPrefixin classAbstractSingleFilterComponent<V>
-
createOperationSelector
-
initOperationSelectorActions
-
getOperationCaption
-
setDataLoader
Description copied from interface:FilterComponentSets aDataLoaderrelated to the current filter component.- Specified by:
setDataLoaderin interfaceFilterComponent- Overrides:
setDataLoaderin classAbstractSingleFilterComponent<V>- Parameters:
dataLoader- aDataLoaderto set
-
getProperty
- Specified by:
getPropertyin interfacePropertyFilter<V>- Returns:
- related entity property name
-
setProperty
Description copied from interface:PropertyFilterSets related entity property name.- Specified by:
setPropertyin interfacePropertyFilter<V>- Parameters:
property- entity property name
-
getOperation
- Specified by:
getOperationin interfacePropertyFilter<V>- Returns:
- a filtering operation
-
setOperation
Description copied from interface:PropertyFilterSets a filtering operation.- Specified by:
setOperationin interfacePropertyFilter<V>- Parameters:
operation- a filtering operation
-
setOperationInternal
-
getParameterName
- Specified by:
getParameterNamein interfaceSingleFilterComponent<V>- Returns:
- the name of the associated query parameter name
-
setParameterName
Description copied from interface:SingleFilterComponentSets the name of the associated query parameter name.- Specified by:
setParameterNamein interfaceSingleFilterComponent<V>- Parameters:
parameterName- a name of the associated query parameter name
-
updateChildAlignment
protected void updateChildAlignment()- Overrides:
updateChildAlignmentin classAbstractSingleFilterComponent<V>
-
createQueryCondition
- Specified by:
createQueryConditionin classAbstractSingleFilterComponent<V>
-
getQueryCondition
- Specified by:
getQueryConditionin interfaceFilterComponent- Specified by:
getQueryConditionin interfacePropertyFilter<V>- Overrides:
getQueryConditionin classAbstractSingleFilterComponent<V>- Returns:
- a
Conditionrelated to the current filter component
-
updateQueryCondition
- Specified by:
updateQueryConditionin classAbstractSingleFilterComponent<V>
-
addOperationChangeListener
public Subscription addOperationChangeListener(Consumer<PropertyFilter.OperationChangeEvent> listener) Description copied from interface:PropertyFilterAdds a listener that is invoked when theoperationproperty changes.- Specified by:
addOperationChangeListenerin interfacePropertyFilter<V>- Parameters:
listener- a listener to add- Returns:
- a registration object for removing an event listener
-
isOperationEditable
public boolean isOperationEditable()- Specified by:
isOperationEditablein interfacePropertyFilter<V>- Returns:
- whether an operation selector is visible.
-
setOperationEditable
public void setOperationEditable(boolean operationEditable) Description copied from interface:PropertyFilterSets whether an operation selector is visible.- Specified by:
setOperationEditablein interfacePropertyFilter<V>- Parameters:
operationEditable- whether an operation selector is visible
-
isOperationCaptionVisible
public boolean isOperationCaptionVisible()- Specified by:
isOperationCaptionVisiblein interfacePropertyFilter<V>- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
public void setOperationCaptionVisible(boolean operationCaptionVisible) Description copied from interface:PropertyFilterSets whether to show operation caption.- Specified by:
setOperationCaptionVisiblein interfacePropertyFilter<V>- Parameters:
operationCaptionVisible- whether to show operation caption
-
updateCaption
- Overrides:
updateCaptionin classAbstractSingleFilterComponent<V>
-
removeOperationSelector
protected void removeOperationSelector() -
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.FocusableSets the tabulator index of theFocusablecomponent. 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:
setTabIndexin interfaceComponent.Focusable- Overrides:
setTabIndexin classAbstractSingleFilterComponent<V>- Parameters:
tabIndex- tab index
-