|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Container.SimpleFilterable
Interface that is implemented by containers which allow reducing their
visible contents based on a set of filters. This interface has been
renamed from Container.SimpleFilterable
, and implementing the new
Container.SimpleFilterable
instead of or in addition to Container.SimpleFilterable
is recommended. This interface might be removed in future Vaadin
versions.
When a set of filters are set, only items that match all the filters are included in the visible contents of the container. Still new items that do not match filters can be added to the container. Multiple filters can be added and the container remembers the state of the filters. When multiple filters are added, all filters must match for an item to be visible in the container.
When an Container.Ordered
or Container.Indexed
container is filtered, all
operations of these interfaces should only use the filtered contents and
the filtered indices to the container.
How filtering is performed when a Container.Hierarchical
container
implements Container.SimpleFilterable
is implementation specific and should
be documented in the implementing class.
Adding items (if supported) to a filtered Container.Ordered
or
Container.Indexed
container should insert them immediately after the
indicated visible item. The unfiltered position of items added at index
0, at index Container.size()
or at an undefined
position is up to the implementation.
The functionality of SimpleFilterable can be implemented using the
Container.SimpleFilterable
API and SimpleStringFilter
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
---|
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer |
Method Summary | |
---|---|
void |
addContainerFilter(java.lang.Object propertyId,
java.lang.String filterString,
boolean ignoreCase,
boolean onlyMatchPrefix)
Add a filter for given property. |
void |
removeAllContainerFilters()
Remove all filters from all properties. |
void |
removeContainerFilters(java.lang.Object propertyId)
Remove all filters from the given property. |
Methods inherited from interface com.vaadin.data.Container |
---|
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size |
Method Detail |
---|
void addContainerFilter(java.lang.Object propertyId, java.lang.String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
The API Filterable#addContainerFilter(Filter)
is recommended
instead of this method. A SimpleStringFilter
can be used with
the new API to implement the old string filtering functionality.
The filter accepts items for which toString() of the value of the given property contains or starts with given filterString. Other items are not visible in the container when filtered.
If a container has multiple filters, only items accepted by all filters are visible.
propertyId
- Property for which the filter is applied to.filterString
- String that must match the value of the propertyignoreCase
- Determine if the casing can be ignored when comparing
strings.onlyMatchPrefix
- Only match prefixes; no other matches are included.void removeAllContainerFilters()
void removeContainerFilters(java.lang.Object propertyId)
propertyId
- for which to remove filters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |