diff options
author | Petri Heinonen <petri@vaadin.com> | 2012-08-23 13:00:17 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-30 15:32:24 +0300 |
commit | f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4 (patch) | |
tree | f2a6d30671a3bbadf2beafc9f90d2c8fd54bf871 /server/src/com/vaadin/ui/AbstractTextField.java | |
parent | 181904db6aa50a10383f098f022da7d4ed801738 (diff) | |
download | vaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.tar.gz vaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.zip |
refak listeners com.vaadin.ui
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractTextField.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractTextField.java | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java index 907ac629b9..c187d9e198 100644 --- a/server/src/com/vaadin/ui/AbstractTextField.java +++ b/server/src/com/vaadin/ui/AbstractTextField.java @@ -512,18 +512,36 @@ public abstract class AbstractTextField extends AbstractField<String> implements } @Override - public void addListener(TextChangeListener listener) { + public void addTextChangeListener(TextChangeListener listener) { addListener(TextChangeListener.EVENT_ID, TextChangeEvent.class, listener, TextChangeListener.EVENT_METHOD); } + /** + * @deprecated Since 7.0, replaced by + * {@link #addTextChangeListener(TextChangeListener)} + **/ + @Deprecated + public void addListener(TextChangeListener listener) { + addTextChangeListener(listener); + } + @Override - public void removeListener(TextChangeListener listener) { + public void removeTextChangeListener(TextChangeListener listener) { removeListener(TextChangeListener.EVENT_ID, TextChangeEvent.class, listener); } /** + * @deprecated Since 7.0, replaced by + * {@link #removeTextChangeListener(TextChangeListener)} + **/ + @Deprecated + public void removeListener(TextChangeListener listener) { + removeTextChangeListener(listener); + } + + /** * The text change timeout modifies how often text change events are * communicated to the application when {@link #getTextChangeEventMode()} is * {@link TextChangeEventMode#LAZY} or {@link TextChangeEventMode#TIMEOUT}. @@ -661,25 +679,60 @@ public abstract class AbstractTextField extends AbstractField<String> implements } @Override - public void addListener(FocusListener listener) { + public void addFocusListener(FocusListener listener) { addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener, FocusListener.focusMethod); } + /** + * @deprecated Since 7.0, replaced by + * {@link #addFocusListener(FocusListener)} + **/ + @Deprecated + public void addListener(FocusListener listener) { + addFocusListener(listener); + } + @Override - public void removeListener(FocusListener listener) { + public void removeFocusListener(FocusListener listener) { removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener); } + /** + * @deprecated Since 7.0, replaced by + * {@link #removeFocusListener(FocusListener)} + **/ + @Deprecated + public void removeListener(FocusListener listener) { + removeFocusListener(listener); + } + @Override - public void addListener(BlurListener listener) { + public void addBlurListener(BlurListener listener) { addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, BlurListener.blurMethod); } + /** + * @deprecated Since 7.0, replaced by {@link #addBlurListener(BlurListener)} + **/ + @Deprecated + public void addListener(BlurListener listener) { + addBlurListener(listener); + } + @Override - public void removeListener(BlurListener listener) { + public void removeBlurListener(BlurListener listener) { removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener); } + /** + * @deprecated Since 7.0, replaced by + * {@link #removeBlurListener(BlurListener)} + **/ + @Deprecated + public void removeListener(BlurListener listener) { + removeBlurListener(listener); + } + } |