From ece831285f81ea48b0ab199f5d45dff4dbb10987 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 23 Mar 2011 12:50:03 +0000 Subject: #6286 Container filtering improvements: javadoc improvements and corrections after review svn changeset:17890/svn branch:6.6 --- src/com/vaadin/data/Container.java | 22 ++++++++++++++-------- .../data/util/AbstractInMemoryContainer.java | 12 +++++++----- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/com/vaadin/data/Container.java b/src/com/vaadin/data/Container.java index 6e9903d597..84cf866f06 100644 --- a/src/com/vaadin/data/Container.java +++ b/src/com/vaadin/data/Container.java @@ -723,11 +723,11 @@ public interface Container extends Serializable { * position is up to the implementation. *

*

- * SimpleFilterable can be implemented using the {@link Filterable} API and - * {@link SimpleStringFilter}. + * The functionality of SimpleFilterable can be implemented using the + * {@link Filterable} API and {@link SimpleStringFilter}. *

* - * @since 5.0 + * @since 5.0 (renamed from Filterable to SimpleFilterable in 6.6) */ public interface SimpleFilterable extends Container, Serializable { @@ -738,8 +738,9 @@ public interface Container extends Serializable { * instead of this method. A {@link SimpleStringFilter} can be used with * the new API to implement the old string filtering functionality. * - * Only items where given property for which toString() contains or - * starts with given filterString are visible in the container. + * 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. @@ -747,7 +748,7 @@ public interface Container extends Serializable { * @param propertyId * Property for which the filter is applied to. * @param filterString - * String that must match contents of the property + * String that must match the value of the property * @param ignoreCase * Determine if the casing can be ignored when comparing * strings. @@ -757,11 +758,16 @@ public interface Container extends Serializable { public void addContainerFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix); - /** Remove all filters from all properties. */ + /** + * Remove all filters from all properties. + */ public void removeAllContainerFilters(); /** - * Remove all filters from given property. + * Remove all filters from the given property. + * + * @param propertyId + * for which to remove filters */ public void removeContainerFilters(Object propertyId); } diff --git a/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/src/com/vaadin/data/util/AbstractInMemoryContainer.java index 79803ed7b7..e41bb42258 100644 --- a/src/com/vaadin/data/util/AbstractInMemoryContainer.java +++ b/src/com/vaadin/data/util/AbstractInMemoryContainer.java @@ -11,6 +11,7 @@ import java.util.Set; import com.vaadin.data.Container; import com.vaadin.data.Container.ItemSetChangeNotifier; import com.vaadin.data.Item; +import com.vaadin.data.util.filter.SimpleStringFilter; import com.vaadin.data.util.filter.UnsupportedFilterException; /** @@ -389,7 +390,10 @@ public abstract class AbstractInMemoryContainer