diff options
author | Henri Sara <hesara@vaadin.com> | 2016-08-09 12:04:44 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-08-09 09:56:10 +0000 |
commit | d5e79088f59ec369fccf8f0bede0e57d067d5a29 (patch) | |
tree | df89e55bb34945e4311e3c338a71dfae2012198c /uitest | |
parent | d1af5d84e3f6b352318aa0819a65a36b7c6e2dad (diff) | |
download | vaadin-framework-d5e79088f59ec369fccf8f0bede0e57d067d5a29.tar.gz vaadin-framework-d5e79088f59ec369fccf8f0bede0e57d067d5a29.zip |
Eliminate calls to deprecated addListener(Focus/BlurListener)
Change-Id: Ia92f8d2c9df32b2dc10ea3fbda02c962d7e8b566
Diffstat (limited to 'uitest')
8 files changed, 30 insertions, 30 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java index 7987c800f9..692e31526a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java +++ b/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java @@ -83,22 +83,22 @@ public class FocusAndBlurListeners extends TestBase { } }); - tf.addListener(focusListener); - tf.addListener(blurListener); - df.addListener(focusListener); - df.addListener(blurListener); - cb.addListener(focusListener); - cb.addListener(blurListener); - btn.addListener(focusListener); - btn.addListener(blurListener); - nbtn.addListener(focusListener); - nbtn.addListener(blurListener); - chkb.addListener(focusListener); - chkb.addListener(blurListener); - og.addListener(focusListener); - og.addListener(blurListener); - ogm.addListener(focusListener); - ogm.addListener(blurListener); + tf.addFocusListener(focusListener); + tf.addBlurListener(blurListener); + df.addFocusListener(focusListener); + df.addBlurListener(blurListener); + cb.addFocusListener(focusListener); + cb.addBlurListener(blurListener); + btn.addFocusListener(focusListener); + btn.addBlurListener(blurListener); + nbtn.addFocusListener(focusListener); + nbtn.addBlurListener(blurListener); + chkb.addFocusListener(focusListener); + chkb.addBlurListener(blurListener); + og.addFocusListener(focusListener); + og.addBlurListener(blurListener); + ogm.addFocusListener(focusListener); + ogm.addBlurListener(blurListener); l.addComponent(messages); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java index d1d2f58239..8ee08532cc 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java @@ -22,7 +22,7 @@ public class ComboBoxSuggestionOnDetach extends TestBase { ComboBox comboBox = new ComboBox("Combo box", Arrays.asList("Option 1", "Option 2", "Option 3")); - comboBox.addListener(new FieldEvents.FocusListener() { + comboBox.addFocusListener(new FieldEvents.FocusListener() { @Override public void focus(FocusEvent event) { popup.close(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java index 6393115c47..214608b2e1 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java @@ -33,7 +33,7 @@ public class ComboFocusBlurEvents extends TestBase { final ObjectProperty<String> log = new ObjectProperty<String>(""); - cb.addListener(new FieldEvents.FocusListener() { + cb.addFocusListener(new FieldEvents.FocusListener() { @Override public void focus(FocusEvent event) { log.setValue(log.getValue().toString() + "<br>" + counter @@ -42,7 +42,7 @@ public class ComboFocusBlurEvents extends TestBase { } }); - cb.addListener(new FieldEvents.BlurListener() { + cb.addBlurListener(new FieldEvents.BlurListener() { @Override public void blur(BlurEvent event) { log.setValue(log.getValue().toString() + "<br>" + counter diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java index fe2cffdc4c..ca5e5a6f06 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java @@ -39,7 +39,7 @@ public class ComboPushTiming extends TestBase { final ObjectProperty<String> log = new ObjectProperty<String>(""); - cb.addListener(new FieldEvents.FocusListener() { + cb.addFocusListener(new FieldEvents.FocusListener() { @Override public void focus(FocusEvent event) { log.setValue(log.getValue().toString() + "<br>" + counter @@ -49,7 +49,7 @@ public class ComboPushTiming extends TestBase { } }); - cb.addListener(new FieldEvents.BlurListener() { + cb.addBlurListener(new FieldEvents.BlurListener() { @Override public void blur(BlurEvent event) { log.setValue(log.getValue().toString() + "<br>" + counter diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java b/uitest/src/main/java/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java index 6f203bf8c9..e5d4b33a04 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java +++ b/uitest/src/main/java/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java @@ -13,7 +13,7 @@ public class FocusListenerBreaksDropdownMenu extends TestBase { comboBox.addItem("Item " + i); } - comboBox.addListener(new FieldEvents.FocusListener() { + comboBox.addFocusListener(new FieldEvents.FocusListener() { @Override public void focus(FieldEvents.FocusEvent event) { comboBox.addItem(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java index d64dbb42d6..848d2a3228 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java @@ -36,7 +36,7 @@ public class TextChangeEvents2 extends TestBase { } }); - tf.addListener(new BlurListener() { + tf.addBlurListener(new BlurListener() { @Override public void blur(BlurEvent event) { @@ -44,7 +44,7 @@ public class TextChangeEvents2 extends TestBase { } }); - tf.addListener(new FocusListener() { + tf.addFocusListener(new FocusListener() { @Override public void focus(FocusEvent event) { System.err.println(tf.getCaption() + " focus"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java index 21dba6a196..2ece9d1b2c 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java @@ -30,8 +30,8 @@ public class TextFieldFocusAndBlurListeners extends TestBase implements TextField tf1 = new TextField("TextField 1", "Has focus and blur listeners"); tf1.setWidth("300px"); - tf1.addListener((FocusListener) this); - tf1.addListener((BlurListener) this); + tf1.addFocusListener(this); + tf1.addBlurListener(this); addComponent(tf1); @@ -45,7 +45,7 @@ public class TextFieldFocusAndBlurListeners extends TestBase implements TextFieldFocusAndBlurListeners.this.valueChange(event); } }); - tf2.addListener(new FocusListener() { + tf2.addFocusListener(new FocusListener() { @Override public void focus(FocusEvent event) { @@ -53,7 +53,7 @@ public class TextFieldFocusAndBlurListeners extends TestBase implements } }); - tf2.addListener(new BlurListener() { + tf2.addBlurListener(new BlurListener() { @Override public void blur(BlurEvent event) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java index 2a0f60f390..6f6703e2bb 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java +++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java @@ -39,14 +39,14 @@ public class SubWindowFocusAndBlurListeners extends TestBase { layout.setSizeUndefined(); layout.addComponent(new TextField()); - window.addListener(new FocusListener() { + window.addFocusListener(new FocusListener() { @Override public void focus(FocusEvent event) { Notification.show("Focused window"); } }); - window.addListener(new BlurListener() { + window.addBlurListener(new BlurListener() { @Override public void blur(BlurEvent event) { Notification.show("Blurred window"); |