summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/Container.java
diff options
context:
space:
mode:
authorJarno Rantala <jarno.rantala@vaadin.com>2013-10-10 13:08:09 +0300
committerLeif Åstrand <leif@vaadin.com>2014-04-25 06:28:29 +0000
commit2d946f525185363e61b136521d2c3340eae74c8f (patch)
treeefc34c59c383b36221105be89a2803e01abac971 /server/src/com/vaadin/data/Container.java
parent91fa89a9a384d64a953996efa6d6f42eff1f4c8a (diff)
downloadvaadin-framework-2d946f525185363e61b136521d2c3340eae74c8f.tar.gz
vaadin-framework-2d946f525185363e61b136521d2c3340eae74c8f.zip
Added ItemSetAddEvent and ItemSetRemoveEvent (#2794)
The events inherits the ItemSetChangedEvent and they contain more information about the added/removed items. These events are fired from AbstractInMemoryContainer. Change-Id: I0a7ddfd38fd01fa385479efc953ab444d1ecdf4c
Diffstat (limited to 'server/src/com/vaadin/data/Container.java')
-rw-r--r--server/src/com/vaadin/data/Container.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/server/src/com/vaadin/data/Container.java b/server/src/com/vaadin/data/Container.java
index ef507c5f31..1e053d1091 100644
--- a/server/src/com/vaadin/data/Container.java
+++ b/server/src/com/vaadin/data/Container.java
@@ -582,6 +582,60 @@ public interface Container extends Serializable {
public Item addItemAt(int index, Object newItemId)
throws UnsupportedOperationException;
+ /**
+ * An <code>Event</code> object specifying information about the added
+ * items.
+ */
+ public interface ItemAddEvent extends ItemSetChangeEvent {
+
+ /**
+ * Gets the item id of the first added item.
+ *
+ * @return item id of the first added item
+ */
+ public Object getFirstItemId();
+
+ /**
+ * Gets the index of the first added item.
+ *
+ * @return index of the first added item
+ */
+ public int getFirstIndex();
+
+ /**
+ * Gets the number of the added items.
+ *
+ * @return the number of added items.
+ */
+ public int getAddedItemsCount();
+ }
+
+ /**
+ * An <code>Event</code> object specifying information about the removed
+ * items.
+ */
+ public interface ItemRemoveEvent extends ItemSetChangeEvent {
+ /**
+ * Gets the item id of the first removed item.
+ *
+ * @return item id of the first removed item
+ */
+ public Object getFirstItemId();
+
+ /**
+ * Gets the index of the first removed item.
+ *
+ * @return index of the first removed item
+ */
+ public int getFirstIndex();
+
+ /**
+ * Gets the number of the removed items.
+ *
+ * @return the number of removed items
+ */
+ public int getRemovedItemsCount();
+ }
}
/**