public class PropertyFilterImpl<V> extends AbstractSingleFilterComponent<V> implements PropertyFilter<V>
Modifier and Type | Class and Description |
---|---|
protected static class |
PropertyFilterImpl.OperationChangeAction |
CompositeComponent.CreateEvent
PropertyFilter.Operation, PropertyFilter.OperationChangeEvent
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
SupportsCaptionPosition.CaptionPosition
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected PropertyFilter.Operation |
operation |
protected boolean |
operationCaptionVisible |
protected boolean |
operationEditable |
protected PopupButton |
operationSelector |
protected static java.lang.String |
PROPERTY_FILTER_STYLENAME |
protected PropertyFilterSupport |
propertyFilterSupport |
protected SingleFilterSupport |
singleFilterSupport |
autoApply, caption, captionLabel, captionPosition, captionWidth, conditionModificationDelegated, dataLoader, icon, queryCondition, uiComponents, valueComponent
applicationContext, frame, id, root
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
PropertyFilterImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addOperationChangeListener(java.util.function.Consumer<PropertyFilter.OperationChangeEvent> listener)
Adds a listener that is invoked when the
operation property changes. |
protected PopupButton |
createOperationSelector() |
protected io.jmix.core.querycondition.PropertyCondition |
createQueryCondition() |
java.lang.String |
getInnerComponentPrefix() |
PropertyFilter.Operation |
getOperation() |
protected java.lang.String |
getOperationCaption(PropertyFilter.Operation operation) |
java.lang.String |
getParameterName() |
java.lang.String |
getProperty() |
io.jmix.core.querycondition.PropertyCondition |
getQueryCondition() |
protected void |
initOperationSelectorActions(PopupButton operationSelector) |
protected void |
initRootComponent(HBoxLayout root) |
boolean |
isOperationCaptionVisible() |
boolean |
isOperationEditable() |
protected void |
removeOperationSelector() |
void |
setDataLoader(DataLoader dataLoader)
Sets a
DataLoader 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(java.lang.String parameterName)
Sets the name of the associated query parameter name.
|
void |
setProperty(java.lang.String property)
Sets related entity property name.
|
void |
setPropertyFilterSupport(PropertyFilterSupport propertyFilterSupport) |
void |
setSingleFilterSupport(SingleFilterSupport singleFilterSupport) |
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
protected void |
updateCaption(java.lang.String caption) |
protected void |
updateChildAlignment() |
protected void |
updateQueryCondition(V newValue) |
addValueChangeListener, apply, checkValueComponentState, createCaptionLabel, createRootComponent, focus, getCaption, getCaptionPosition, getCaptionWidth, getCaptionWidthSizeUnit, getChildAlignment, getContextHelpIconClickHandler, getContextHelpText, getDataLoader, getIcon, getIconName, getRequiredMessage, getTabIndex, getValue, getValueComponent, initValueComponent, isAutoApply, isConditionModificationDelegated, isContextHelpTextHtmlEnabled, isEditable, isRequired, isValid, onCreate, onValueChanged, setAutoApply, setCaption, setCaptionAsHtml, setCaptionPosition, setCaptionWidth, setConditionModificationDelegated, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setEditable, setIcon, setIconFromSet, setRequired, setRequiredMessage, setUiComponentProperties, setUiComponents, setValue, setValueComponent, setWidth, updateCaptionLayout, updateDataLoaderCondition, updateIcon, validate
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, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCaptionWidth, getCaptionWidthSizeUnit, getValueComponent, setCaptionWidth, setValueComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegated
getFrame, setFrame
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
getIcon, setIcon, setIconFromSet
focus, getTabIndex, isFocusable, setFocusable
isEditable, isEditableWithParent, setEditable
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
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
getCaptionPosition, setCaptionPosition
getRequiredMessage, isRequired, setRequired, setRequiredMessage
isValid, isValidateOnCommit, validate
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
protected static final java.lang.String PROPERTY_FILTER_STYLENAME
protected PropertyFilterSupport propertyFilterSupport
protected SingleFilterSupport singleFilterSupport
protected PopupButton operationSelector
protected PropertyFilter.Operation operation
protected boolean operationEditable
protected boolean operationCaptionVisible
@Autowired public void setPropertyFilterSupport(PropertyFilterSupport propertyFilterSupport)
@Autowired public void setSingleFilterSupport(SingleFilterSupport singleFilterSupport)
protected void initRootComponent(HBoxLayout root)
initRootComponent
in class AbstractSingleFilterComponent<V>
public java.lang.String getInnerComponentPrefix()
getInnerComponentPrefix
in class AbstractSingleFilterComponent<V>
protected PopupButton createOperationSelector()
protected void initOperationSelectorActions(@Nullable PopupButton operationSelector)
protected java.lang.String getOperationCaption(PropertyFilter.Operation operation)
public void setDataLoader(DataLoader dataLoader)
FilterComponent
DataLoader
related to the current filter component.setDataLoader
in interface FilterComponent
setDataLoader
in class AbstractSingleFilterComponent<V>
dataLoader
- a DataLoader
to setpublic java.lang.String getProperty()
getProperty
in interface PropertyFilter<V>
public void setProperty(java.lang.String property)
PropertyFilter
setProperty
in interface PropertyFilter<V>
property
- entity property namepublic PropertyFilter.Operation getOperation()
getOperation
in interface PropertyFilter<V>
public void setOperation(PropertyFilter.Operation operation)
PropertyFilter
setOperation
in interface PropertyFilter<V>
operation
- a filtering operationprotected void setOperationInternal(PropertyFilter.Operation operation)
public java.lang.String getParameterName()
getParameterName
in interface SingleFilterComponent<V>
public void setParameterName(java.lang.String parameterName)
SingleFilterComponent
setParameterName
in interface SingleFilterComponent<V>
parameterName
- a name of the associated query parameter nameprotected void updateChildAlignment()
updateChildAlignment
in class AbstractSingleFilterComponent<V>
protected io.jmix.core.querycondition.PropertyCondition createQueryCondition()
createQueryCondition
in class AbstractSingleFilterComponent<V>
public io.jmix.core.querycondition.PropertyCondition getQueryCondition()
getQueryCondition
in interface FilterComponent
getQueryCondition
in interface PropertyFilter<V>
getQueryCondition
in class AbstractSingleFilterComponent<V>
Condition
related to the current filter componentprotected void updateQueryCondition(@Nullable V newValue)
updateQueryCondition
in class AbstractSingleFilterComponent<V>
public io.jmix.core.common.event.Subscription addOperationChangeListener(java.util.function.Consumer<PropertyFilter.OperationChangeEvent> listener)
PropertyFilter
operation
property changes.addOperationChangeListener
in interface PropertyFilter<V>
listener
- a listener to addpublic boolean isOperationEditable()
isOperationEditable
in interface PropertyFilter<V>
public void setOperationEditable(boolean operationEditable)
PropertyFilter
setOperationEditable
in interface PropertyFilter<V>
operationEditable
- whether an operation selector is visiblepublic boolean isOperationCaptionVisible()
isOperationCaptionVisible
in interface PropertyFilter<V>
public void setOperationCaptionVisible(boolean operationCaptionVisible)
PropertyFilter
setOperationCaptionVisible
in interface PropertyFilter<V>
operationCaptionVisible
- whether to show operation captionprotected void updateCaption(@Nullable java.lang.String caption)
updateCaption
in class AbstractSingleFilterComponent<V>
protected void removeOperationSelector()
public void setTabIndex(int tabIndex)
Component.Focusable
Focusable
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.setTabIndex
in interface Component.Focusable
setTabIndex
in class AbstractSingleFilterComponent<V>
tabIndex
- tab index