public interface Filter extends Component.Margin, Component.BelongToFrame, Component.HasNamedComponents, Component.HasXmlDescriptor, Component.HasSettings, Component.HasCaption, Component.HasIcon, Component.Collapsable
Modifier and Type | Interface and Description |
---|---|
static interface |
Filter.AfterFilterAppliedHandler |
static interface |
Filter.BeforeFilterAppliedHandler |
static interface |
Filter.FilterEntityChangeListener |
static interface |
Filter.PropertiesFilterPredicate
A predicate that tests whether a property with the given path should be available for filtering.
|
Component.Collapsable.CollapseListener, Component.Collapsable.ExpandListener
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.ContextHelpIconClickEvent, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasContextHelp, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasOptionsStyleProvider, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OptionsStyleProvider, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener, Component.Wrapper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLY_ACTION_ID
Action registered with parent frame to apply filter.
|
static java.lang.String |
NAME |
static java.lang.String |
SELECT_ACTION_ID
Action registered with parent frame to open filter select menu.
|
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addFilterEntityChangeListener(Filter.FilterEntityChangeListener listener) |
boolean |
apply(boolean notifyInvalidConditions)
Applies the filter.
|
Filter.AfterFilterAppliedHandler |
getAfterFilterAppliedHandler() |
Component |
getApplyTo() |
Filter.BeforeFilterAppliedHandler |
getBeforeFilterAppliedHandler() |
int |
getColumnsCount() |
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 |
isBorderVisible()
Determines whether or not border is visible.
|
boolean |
isEditable() |
boolean |
isFolderActionsEnabled() |
void |
setAfterFilterAppliedHandler(Filter.AfterFilterAppliedHandler afterFilterAppliedHandler) |
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 |
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 |
switchFilterMode(FilterDelegate.FilterMode filterMode)
Changes the filter mode and repaints the filter layout
|
getMargin, setMargin, setMargin, setMargin
getFrame, setFrame
getComponent
getXmlDescriptor, setXmlDescriptor
applySettings, isSettingsEnabled, saveSettings, setSettingsEnabled
getCaption, getDescription, setCaption, setDescription
getIcon, setIcon, setIconFromSet
addExpandedStateChangeListener, addListener, addListener, isCollapsable, isExpanded, removeExpandedStateChangeListener, removeListener, removeListener, setCollapsable, setExpanded
addStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
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
- Filter.AfterFilterAppliedHandler getAfterFilterAppliedHandler()
void setAfterFilterAppliedHandler(Filter.AfterFilterAppliedHandler afterFilterAppliedHandler)
CollectionDatasource getDatasource()
void setDatasource(CollectionDatasource datasource)
void setFilterEntity(FilterEntity filterEntity)
boolean 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()