com.itmill.toolkit.data
Interface Container.Filterable

All Superinterfaces:
Container
All Known Implementing Classes:
HierarchicalContainer, IndexedContainer
Enclosing interface:
Container

public static interface Container.Filterable
extends Container

Interface is implemented by containers that allow reducing their visiblecontents with set of filters. When a set of filters are set, only items that match 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.

Since:
5.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Container
Container.Editor, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.Sortable, Container.Viewer
 
Method Summary
 void addContainerFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
          Add a filter for given property.
 void removeAllContainerFilters()
          Remove all filters from all properties.
 void removeContainerFilters(Object propertyId)
          Remove all filters from given property.
 
Methods inherited from interface com.itmill.toolkit.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size
 

Method Detail

addContainerFilter

void addContainerFilter(Object propertyId,
                        String filterString,
                        boolean ignoreCase,
                        boolean onlyMatchPrefix)
Add a filter for given property. Only items where given property for which toString() contains or starts with given filterString are visible in the container.

Parameters:
propertyId - Property for which the filter is applied to.
filterString - String that must match contents of the property
ignoreCase - Determine if the casing can be ignored when comparing strings.
onlyMatchPrefix - Only match prefixes; no other matches are included.

removeAllContainerFilters

void removeAllContainerFilters()
Remove all filters from all properties.


removeContainerFilters

void removeContainerFilters(Object propertyId)
Remove all filters from given property.



Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.