public interface Filter extends HasMargin, Component.BelongToFrame, HasNamedComponents, HasSettings, HasDataLoadingSettings, Component.HasCaption, HasContextHelp, Component.HasIcon, Collapsable, Component.Focusable, HasHtmlCaption, HasHtmlDescription
Modifier and Type | Interface and Description |
---|---|
static interface |
Filter.AfterFilterAppliedHandler |
static interface |
Filter.BeforeFilterAppliedHandler |
static interface |
Filter.FilterEntityChangeListener |
static class |
Filter.FilterOptions |
static interface |
Filter.PropertiesFilterPredicate
A predicate that tests whether a property with the given path should be available for filtering.
|
HasContextHelp.ContextHelpIconClickEvent
Collapsable.ExpandedStateChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLY_ACTION_ID
Action registered with list component and filter layout to apply filter.
|
static java.lang.String |
NAME |
static java.lang.String |
SELECT_ACTION_ID
Action registered with list component and filter layout to open filter select menu.
|
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addFilterEntityChangeListener(Filter.FilterEntityChangeListener listener) |
boolean |
apply(boolean notifyInvalidConditions)
Applies the filter.
|
boolean |
apply(Filter.FilterOptions options)
Applies the filter.
|
Filter.AfterFilterAppliedHandler |
getAfterFilterAppliedHandler() |
Component |
getApplyTo() |
Filter.BeforeFilterAppliedHandler |
getBeforeFilterAppliedHandler() |
int |
getColumnsCount() |
CollectionLoader |
getDataLoader()
Returns
DataLoader which the filter is applied to. |
CollectionDatasource |
getDatasource() |
java.util.List<Filter.FilterEntityChangeListener> |
getFilterEntityChangeListeners() |
java.lang.Boolean |
getManualApplyRequired() |
int |
getMaxResults() |
java.lang.Object |
getParamValue(java.lang.String paramName)
Gets the value of the filter parameter component.
|
Filter.PropertiesFilterPredicate |
getPropertiesFilterPredicate() |
boolean |
getTextMaxResults() |
boolean |
getUseMaxResults() |
boolean |
isApplyImmediately() |
boolean |
isBorderVisible()
Determines whether or not border is visible.
|
boolean |
isEditable() |
boolean |
isFolderActionsEnabled() |
boolean |
isWindowCaptionUpdateEnabled() |
void |
setAfterFilterAppliedHandler(Filter.AfterFilterAppliedHandler afterFilterAppliedHandler) |
void |
setApplyImmediately(boolean immediately)
Set to true if filter should be applied immediately after every parameter's value changing.
|
void |
setApplyTo(Component component)
Sets the component associated with the filter.
|
void |
setBeforeFilterAppliedHandler(Filter.BeforeFilterAppliedHandler beforeFilterAppliedHandler)
Sets the handler that will be invoked before the filter is applied.
|
void |
setBorderVisible(boolean visible)
Sets whether border is visible.
|
void |
setColumnsCount(int columnsCount)
Number of conditions to be displayed in one row
|
void |
setDataLoader(CollectionLoader loader)
Sets
DataLoader which the filter is applied to. |
void |
setDatasource(CollectionDatasource datasource) |
void |
setEditable(boolean editable) |
void |
setFilterEntity(FilterEntity filterEntity) |
void |
setFolderActionsEnabled(boolean enabled) |
void |
setManualApplyRequired(java.lang.Boolean manualApplyRequired)
Defines when the filter will be applied.
|
void |
setMaxResults(int maxResults)
Sets rows count restriction.
|
void |
setModeSwitchVisible(boolean modeSwitchVisible)
Sets filter mode switch visibility
|
void |
setParamValue(java.lang.String paramName,
java.lang.Object value)
Sets the value to the filter parameter component.
|
void |
setPropertiesFilterPredicate(Filter.PropertiesFilterPredicate predicate)
Enables to setup which properties should be available for filtering.
|
void |
setTextMaxResults(boolean textMaxResults)
Whether to use a text field for entering a max results value.
|
void |
setUseMaxResults(boolean useMaxResults)
Whether to show field for rows count restriction.
|
void |
setWindowCaptionUpdateEnabled(boolean windowCaptionUpdateEnabled)
If
windowCaptionUpdateEnabled is true then window caption will contain a filter name, e.g. |
void |
switchFilterMode(FilterDelegate.FilterMode filterMode)
Changes the filter mode and repaints the filter layout
|
getMargin, setMargin, setMargin, setMargin
getFrame, setFrame
getComponent
applySettings, isSettingsEnabled, saveSettings, setSettingsEnabled
applyDataLoadingSettings
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
getIcon, setIcon, setIconFromSet
addExpandedStateChangeListener, isCollapsable, isExpanded, removeExpandedStateChangeListener, setCollapsable, setExpanded
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
static final java.lang.String NAME
static final java.lang.String APPLY_ACTION_ID
static final java.lang.String SELECT_ACTION_ID
Filter.BeforeFilterAppliedHandler getBeforeFilterAppliedHandler()
void setBeforeFilterAppliedHandler(Filter.BeforeFilterAppliedHandler beforeFilterAppliedHandler)
Filter.BeforeFilterAppliedHandler.beforeFilterApplied()
returns false, then the filter won't be appliedbeforeFilterAppliedHandler
- handlerFilter.AfterFilterAppliedHandler getAfterFilterAppliedHandler()
void setAfterFilterAppliedHandler(Filter.AfterFilterAppliedHandler afterFilterAppliedHandler)
CollectionLoader getDataLoader()
DataLoader
which the filter is applied to.void setDataLoader(CollectionLoader loader)
DataLoader
which the filter is applied to.CollectionDatasource getDatasource()
void setDatasource(CollectionDatasource datasource)
void setFilterEntity(FilterEntity filterEntity)
boolean apply(Filter.FilterOptions options)
options
- an options objectboolean apply(boolean notifyInvalidConditions)
notifyInvalidConditions
- whether a notification about invalid conditions values should be displayedvoid setMaxResults(int maxResults)
maxResults
- restriction on number of rowsint getMaxResults()
void setModeSwitchVisible(boolean modeSwitchVisible)
void switchFilterMode(FilterDelegate.FilterMode filterMode)
void setUseMaxResults(boolean useMaxResults)
Automatically set to false for HierarchicalDatasource
.
boolean getUseMaxResults()
void setTextMaxResults(boolean textMaxResults)
textMaxResults
- true if use TextFieldboolean getTextMaxResults()
void setApplyTo(Component component)
Component getApplyTo()
void setManualApplyRequired(java.lang.Boolean manualApplyRequired)
java.lang.Boolean getManualApplyRequired()
void setEditable(boolean editable)
boolean isEditable()
void setFolderActionsEnabled(boolean enabled)
boolean isFolderActionsEnabled()
void setParamValue(java.lang.String paramName, java.lang.Object value)
paramName
- parameter name. It can be found at runtime in the filter editor window. Right click at the
necessary condition and select 'Show component name' item in the popup menu. Component name
there will be like 'component$genericFilter.email12482'. paramName
parameter in this
method requires only the last part of this string, i.e. you should pass 'email12482'value
- parameter valuejava.lang.Object getParamValue(java.lang.String paramName)
paramName
- parameter name. It can be found at runtime in the filter editor window. Right click at the
necessary condition and select 'Show component name' item in the popup menu. Component name
there will be like 'component$genericFilter.email12482'. paramName
parameter in this
method requires only the last part of this string, i.e. you should pass 'email12482'void addFilterEntityChangeListener(Filter.FilterEntityChangeListener listener)
java.util.List<Filter.FilterEntityChangeListener> getFilterEntityChangeListeners()
void setColumnsCount(int columnsCount)
int getColumnsCount()
void setBorderVisible(boolean visible)
visible
- true
to show the border, false
to hide itboolean isBorderVisible()
true
if the border is visiblevoid setPropertiesFilterPredicate(Filter.PropertiesFilterPredicate predicate)
predicate
- properties filter predicateFilter.PropertiesFilterPredicate getPropertiesFilterPredicate()
void setWindowCaptionUpdateEnabled(boolean windowCaptionUpdateEnabled)
windowCaptionUpdateEnabled
is true then window caption will contain a filter name, e.g. "Some Browser: filterName", if the
parameter value is false, when window caption will not be modified when the filter is selectedboolean isWindowCaptionUpdateEnabled()
void setApplyImmediately(boolean immediately)
ClientConfig.getGenericFilterApplyImmediately()
property.immediately
- immediately optionboolean isApplyImmediately()