diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-11-05 16:00:14 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-11-05 16:00:14 +0000 |
commit | d9aae37b8d56f9b8363690df8ca51c3f332873e6 (patch) | |
tree | 40dc208000d2c1aae0cbbd2b1ff2d51efd31f474 /src/com/vaadin/event | |
parent | 9098e8a164d1800d53e41ec3e7a06bdc3f82f1ca (diff) | |
download | vaadin-framework-d9aae37b8d56f9b8363690df8ca51c3f332873e6.tar.gz vaadin-framework-d9aae37b8d56f9b8363690df8ca51c3f332873e6.zip |
#5821 - ItemClickSource should be ItemClickNotifier
svn changeset:15889/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/event')
-rw-r--r-- | src/com/vaadin/event/ItemClickEvent.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/vaadin/event/ItemClickEvent.java b/src/com/vaadin/event/ItemClickEvent.java index ab8d652c6e..6ec1c59be6 100644 --- a/src/com/vaadin/event/ItemClickEvent.java +++ b/src/com/vaadin/event/ItemClickEvent.java @@ -88,7 +88,10 @@ public class ItemClickEvent extends ClickEvent implements Serializable { * * @link {@link Container} interface may support emitting * {@link ItemClickEvent}s. + * + * @deprecated Use {@link ItemClickNotifier} instead. */ + @Deprecated public interface ItemClickSource extends Serializable { /** * Register listener to handle ItemClickEvents. @@ -110,4 +113,40 @@ public class ItemClickEvent extends ClickEvent implements Serializable { public void removeListener(ItemClickListener listener); } + /** + * The interface for adding and removing <code>ItemClickEvent</code> + * listeners. By implementing this interface a class explicitly announces + * that it will generate an <code>ItemClickEvent</code> when one of its + * items is clicked. + * <p> + * Note: The general Java convention is not to explicitly declare that a + * class generates events, but to directly define the + * <code>addListener</code> and <code>removeListener</code> methods. That + * way the caller of these methods has no real way of finding out if the + * class really will send the events, or if it just defines the methods to + * be able to implement an interface. + * </p> + * + * @since 6.5 + * @see ItemClickListener + * @see ItemClickEvent + */ + public interface ItemClickNotifier extends Serializable { + /** + * Register a listener to handle {@link ItemClickEvent}s. + * + * @param listener + * ItemClickListener to be registered + */ + public void addListener(ItemClickListener listener); + + /** + * Removes an ItemClickListener. + * + * @param listener + * ItemClickListener to be removed + */ + public void removeListener(ItemClickListener listener); + } + } |