diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-30 15:44:18 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-30 15:44:18 +0300 |
commit | a79339bae7da7d9f0cc867bcf6cef37d0a7afa0d (patch) | |
tree | 22848afef3219e9a3320f3c3e46ea10994310d00 /server/src | |
parent | 8cf552dd6961047afa5116cd576c5f3da2293a4e (diff) | |
download | vaadin-framework-a79339bae7da7d9f0cc867bcf6cef37d0a7afa0d.tar.gz vaadin-framework-a79339bae7da7d9f0cc867bcf6cef37d0a7afa0d.zip |
Deprecate addListener in Image (#9285)
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/Image.java | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/server/src/com/vaadin/ui/Image.java b/server/src/com/vaadin/ui/Image.java index 8e43d88b37..178e557cf3 100644 --- a/server/src/com/vaadin/ui/Image.java +++ b/server/src/com/vaadin/ui/Image.java @@ -66,28 +66,46 @@ public class Image extends AbstractEmbedded { } /** + * @deprecated As of 7.0.0, use {@link #addClickListener(ClickListener)} + * instead + */ + @Deprecated + public void addListener(ClickListener listener) { + addClickListener(listener); + } + + /** * Add a click listener to the component. The listener is called whenever * the user clicks inside the component. Depending on the content the event * may be blocked and in that case no event is fired. * - * Use {@link #removeListener(ClickListener)} to remove the listener. + * Use {@link #removeClickListener(ClickListener)} to remove the listener. * * @param listener * The listener to add */ - public void addListener(ClickListener listener) { + public void addClickListener(ClickListener listener) { addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener, ClickListener.clickMethod); } /** + * @deprecated As of 7.0.0, use {@link #removeClickListener(ClickListener)} + * instead + */ + @Deprecated + public void removeListener(ClickListener listener) { + removeClickListener(listener); + } + + /** * Remove a click listener from the component. The listener should earlier - * have been added using {@link #addListener(ClickListener)}. + * have been added using {@link #addClickListener(ClickListener)}. * * @param listener * The listener to remove */ - public void removeListener(ClickListener listener) { + public void removeClickListener(ClickListener listener) { removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener); } |