diff options
author | Henri Sara <henri.sara@itmill.com> | 2011-03-23 12:50:03 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2011-03-23 12:50:03 +0000 |
commit | ece831285f81ea48b0ab199f5d45dff4dbb10987 (patch) | |
tree | c19d4c71281d4355643742fe659c379dab269b95 | |
parent | 075ea1aef2942261ea000dd9eb8fde99d1e19dcf (diff) | |
download | vaadin-framework-ece831285f81ea48b0ab199f5d45dff4dbb10987.tar.gz vaadin-framework-ece831285f81ea48b0ab199f5d45dff4dbb10987.zip |
#6286 Container filtering improvements: javadoc improvements and corrections after review
svn changeset:17890/svn branch:6.6
-rw-r--r-- | src/com/vaadin/data/Container.java | 22 | ||||
-rw-r--r-- | src/com/vaadin/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. * </p> * <p> - * 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}. * </p> * - * @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<ITEMIDTYPE, PROPERTYIDCLASS, ITE * be in-memory filterable. * * This can be used to implement - * {@link Filterable#addContainerFilter(Object, String, boolean, boolean)}. + * {@link Filterable#addContainerFilter(com.vaadin.data.Container.Filter)} + * and optionally also + * {@link SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)} + * (with {@link SimpleStringFilter}). * * Note that in some cases, incompatible filters cannot be detected when * added and an {@link UnsupportedFilterException} may occur when performing @@ -663,8 +667,6 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * Add an item at the end of the container, and perform filtering if * necessary. An event is fired if the filtered view changes. * - * The new item is added at the beginning if previousItemId is null. - * * @param newItemId * @param item * new item to add @@ -725,8 +727,8 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE } /** - * Add an item at a given (visible) item index, and perform filtering. An - * event is fired if the filtered view changes. + * Add an item at a given (visible after filtering) item index, and perform + * filtering. An event is fired if the filtered view changes. * * @param index * position where to add the item (visible/view index) |