summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2016-09-23 13:14:52 +0300
committerDenis Anisimov <denis@vaadin.com>2016-09-29 13:14:35 +0000
commit2bee988272657df4d886ea79b04be9fbc54d3928 (patch)
tree6825ec60243faac7fd4114928090e115e2e11d01 /uitest
parent599b61bc8598db35fa111880dd4db57f9da2adda (diff)
downloadvaadin-framework-2bee988272657df4d886ea79b04be9fbc54d3928.tar.gz
vaadin-framework-2bee988272657df4d886ea79b04be9fbc54d3928.zip
Unify listeners on the server side
This patch updates server side add*Listener methods to return a registration object and deprecates their corresponding remove*Listener methods. Additionally this patch removes add/removeListener methods which were deprecated in 7.0. Change-Id: I26ac5f11882512288fbbf601c7cb2aaff653ec76
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/FocusingComponents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ListenerOrder.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ModalWindow.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestBench.java135
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestDateField.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForUpload.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ErrorInUnloadEvent.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonErrorMessage.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/Buttons2.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/TooltipForDisabledButton.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInPopupView.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentSizeUpdate.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldReadOnly.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/LabelWrapping.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldNotScroll.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/AddNonRenderedRow.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ScrollDetachSynchronization.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNPE.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeContainerChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/ForceSubmit.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadFilename.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ExecuteJavaScript.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java33
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindows.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowClickEvents.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingUp.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/DeepComponentTrees.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutNPE.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutPerformance.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java2
92 files changed, 286 insertions, 285 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java b/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
index 0de6a03986..3f86939378 100644
--- a/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
@@ -53,7 +53,7 @@ public class FocusingComponents extends CustomComponent {
}
Button focus = new Button("focus");
- focus.addListener(new Button.ClickListener() {
+ focus.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
f.focus();
diff --git a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
index 3e885f1078..c4fe9a2a65 100644
--- a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
@@ -47,18 +47,18 @@ public class ListenerOrder extends com.vaadin.server.LegacyApplication
MyClickListener mutualListener = new MyClickListener("mutual1");
addListeners(b1, 1);
- b1.addListener(mutualListener);
- b1.addListener(mutualListener);
- b1.addListener(this);
- b1.addListener(mutualListener);
+ b1.addClickListener(mutualListener);
+ b1.addClickListener(mutualListener);
+ b1.addClickListener(this);
+ b1.addClickListener(mutualListener);
Button.ClickListener b1Listener = addListeners(b1, 3);
- b1.addListener(mutualListener);
- b1.addListener(this);
+ b1.addClickListener(mutualListener);
+ b1.addClickListener(this);
// b1.addListener((ValueChangeListener) this);
- b1.addListener(mutualListener);
- b1.removeListener(b1Listener);
+ b1.addClickListener(mutualListener);
+ b1.removeClickListener(b1Listener);
// remove non-existing listener
- b1.removeListener(new Button.ClickListener() {
+ b1.removeClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
}
@@ -103,7 +103,7 @@ public class ListenerOrder extends com.vaadin.server.LegacyApplication
Button.ClickListener listener = null;
for (int i = 0; i < count; i++) {
listener = new MyClickListener(name);
- b.addListener(listener);
+ b.addClickListener(listener);
}
// return last listener added
return listener;
diff --git a/uitest/src/main/java/com/vaadin/tests/ModalWindow.java b/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
index b366e2d01b..91946fad4a 100644
--- a/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -56,12 +56,12 @@ public class ModalWindow extends com.vaadin.server.LegacyApplication
// Main window button
final Button b = new Button("Test Button in main window");
- b.addListener(this);
+ b.addClickListener(this);
b.setTabIndex(2);
main.addComponent(b);
reopen = new Button("Open modal subwindow");
- reopen.addListener(this);
+ reopen.addClickListener(this);
reopen.setTabIndex(3);
main.addComponent(reopen);
@@ -95,7 +95,7 @@ public class ModalWindow extends com.vaadin.server.LegacyApplication
// Modal window button
final Button b = new Button("Test Button in modal window");
b.setTabIndex(5);
- b.addListener(this);
+ b.addClickListener(this);
layout.addComponent(b);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
index 0dbe05fdee..d878c19aa8 100644
--- a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -71,7 +71,7 @@ public class OrderedLayoutSwapComponents extends CustomComponent {
ol.setId(name.replaceAll(" ", ""));
ol.addComponent(new Label(name));
up = new Button("up");
- up.addListener(new Button.ClickListener() {
+ up.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
int newIndex = order.indexOf(MyComponent.this) - 1;
@@ -89,7 +89,7 @@ public class OrderedLayoutSwapComponents extends CustomComponent {
ol.addComponent(up);
down = new Button("down");
- down.addListener(new Button.ClickListener() {
+ down.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
int newIndex = order.indexOf(MyComponent.this) + 1;
diff --git a/uitest/src/main/java/com/vaadin/tests/TestBench.java b/uitest/src/main/java/com/vaadin/tests/TestBench.java
index 2f77086ed7..d66f58e539 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestBench.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestBench.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -133,80 +133,83 @@ public class TestBench extends com.vaadin.server.LegacyApplication
VerticalLayout lo = new VerticalLayout();
lo.addComponent(menu);
- mainWindow.getPage().addListener(new Page.UriFragmentChangedListener() {
- @Override
- public void uriFragmentChanged(UriFragmentChangedEvent source) {
- String fragment = source.getUriFragment();
- if (fragment != null && !"".equals(fragment)) {
- // try to find a proper test class
-
- // exact match
- Iterator<?> iterator = menu.getItemIds().iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof Class) {
- Class<?> c = (Class<?>) next;
- String string = c.getName();
- if (string.equals(fragment)) {
- menu.setValue(c);
- mainLayout.setSplitPosition(0);
- return;
+ mainWindow.getPage().addUriFragmentChangedListener(
+ new Page.UriFragmentChangedListener() {
+ @Override
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent source) {
+ String fragment = source.getUriFragment();
+ if (fragment != null && !"".equals(fragment)) {
+ // try to find a proper test class
+
+ // exact match
+ Iterator<?> iterator = menu.getItemIds().iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof Class) {
+ Class<?> c = (Class<?>) next;
+ String string = c.getName();
+ if (string.equals(fragment)) {
+ menu.setValue(c);
+ mainLayout.setSplitPosition(0);
+ return;
+ }
+ }
}
- }
- }
- // simple name match
- iterator = menu.getItemIds().iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof Class) {
- Class<?> c = (Class<?>) next;
- String string = c.getSimpleName();
- if (string.equals(fragment)) {
- menu.setValue(c);
- mainLayout.setSplitPosition(0);
- return;
+ // simple name match
+ iterator = menu.getItemIds().iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof Class) {
+ Class<?> c = (Class<?>) next;
+ String string = c.getSimpleName();
+ if (string.equals(fragment)) {
+ menu.setValue(c);
+ mainLayout.setSplitPosition(0);
+ return;
+ }
+ }
}
- }
- }
- // ticket match
- iterator = menu.getItemIds().iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof Class) {
- Class<?> c = (Class<?>) next;
- String string = c.getSimpleName();
- if (string.startsWith("Ticket" + fragment)) {
- menu.setValue(c);
- mainLayout.setSplitPosition(0);
- return;
+ // ticket match
+ iterator = menu.getItemIds().iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof Class) {
+ Class<?> c = (Class<?>) next;
+ String string = c.getSimpleName();
+ if (string
+ .startsWith("Ticket" + fragment)) {
+ menu.setValue(c);
+ mainLayout.setSplitPosition(0);
+ return;
+ }
+ }
}
- }
- }
- // just partly mach lowercase
- iterator = menu.getItemIds().iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof Class) {
- Class<?> c = (Class<?>) next;
- String string = c.getSimpleName();
- if (string.toLowerCase()
- .contains(fragment.toLowerCase())) {
- menu.setValue(c);
- mainLayout.setSplitPosition(0);
- return;
+ // just partly mach lowercase
+ iterator = menu.getItemIds().iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof Class) {
+ Class<?> c = (Class<?>) next;
+ String string = c.getSimpleName();
+ if (string.toLowerCase()
+ .contains(fragment.toLowerCase())) {
+ menu.setValue(c);
+ mainLayout.setSplitPosition(0);
+ return;
+ }
+ }
}
- }
- }
- getMainWindow().showNotification(
- "No potential matc for #" + fragment);
+ getMainWindow().showNotification(
+ "No potential matc for #" + fragment);
- }
+ }
- }
- });
+ }
+ });
mainLayout.addComponent(lo);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestDateField.java b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
index 7a63c628b4..c3d96a6214 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -85,5 +85,4 @@ public class TestDateField extends CustomComponent {
df.setIcon(res);
super.attach();
}
-
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
index 10c3328e89..707aa51d6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -72,7 +72,7 @@ public class TestForContainerFilterable extends CustomComponent {
t.setContainerDataSource(ic);
// Handler
- filterButton.addListener(new Button.ClickListener() {
+ filterButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
ic.removeAllContainerFilters();
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
index 3f53686071..7344d05403 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -40,7 +40,6 @@ import com.vaadin.ui.Upload;
import com.vaadin.ui.Upload.FailedEvent;
import com.vaadin.ui.Upload.FailedListener;
import com.vaadin.ui.Upload.FinishedEvent;
-import com.vaadin.ui.Upload.FinishedListener;
import com.vaadin.ui.Upload.StartedEvent;
import com.vaadin.ui.Upload.StartedListener;
import com.vaadin.ui.Upload.SucceededEvent;
@@ -76,12 +75,12 @@ public class TestForStyledUpload extends LegacyApplication
up = new Upload(null, buffer);
up.setButtonCaption("Select file");
up.setImmediate(true);
- up.addListener((FinishedListener) this);
- up.addListener((FailedListener) this);
- up.addListener((SucceededListener) this);
- up.addListener((StartedListener) this);
+ up.addFinishedListener(this);
+ up.addFailedListener(this);
+ up.addSucceededListener(this);
+ up.addStartedListener(this);
- up.addListener(new Upload.ProgressListener() {
+ up.addProgressListener(new Upload.ProgressListener() {
@Override
public void updateProgress(long readBytes, long contentLenght) {
@@ -128,7 +127,7 @@ public class TestForStyledUpload extends LegacyApplication
main.addComponent(status);
Button cancel = new Button("Cancel current upload");
- cancel.addListener(new Button.ClickListener() {
+ cancel.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
buffer.cancel();
@@ -138,7 +137,7 @@ public class TestForStyledUpload extends LegacyApplication
main.addComponent(cancel);
final Button restart = new Button("Restart demo application");
- restart.addListener(new Button.ClickListener() {
+ restart.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java b/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
index 4dfa1b96a6..dc37ee0f6d 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
@@ -17,10 +17,10 @@ public class TestForTabSheet extends CustomComponent
TestForTabSheet() {
setCompositionRoot(tabsheet);
- tabsheet.addListener(this);
+ tabsheet.addSelectedTabChangeListener(this);
/* Listen for button click events. */
- tab1_root.addListener(this);
+ tab1_root.addClickListener(this);
tabsheet.addTab(tab1_root, "First Tab", null);
/* A tab that is initially disabled. */
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
index 5014dcfac4..e5cc82374d 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -116,7 +116,7 @@ public class TestForUpload extends CustomComponent
}
});
- up.addListener(new StartedListener() {
+ up.addStartedListener(new StartedListener() {
private static final long serialVersionUID = 5508883803861085154L;
@Override
@@ -130,7 +130,7 @@ public class TestForUpload extends CustomComponent
}
});
- up.addListener(new Upload.FinishedListener() {
+ up.addFinishedListener(new Upload.FinishedListener() {
private static final long serialVersionUID = -3773034195991947371L;
@Override
@@ -174,7 +174,7 @@ public class TestForUpload extends CustomComponent
}
});
- up.addListener(new Upload.ProgressListener() {
+ up.addProgressListener(new Upload.ProgressListener() {
@Override
public void updateProgress(long readBytes, long contentLenght) {
@@ -205,7 +205,7 @@ public class TestForUpload extends CustomComponent
main.addComponent(beSluggish);
main.addComponent(throwExecption);
main.addComponent(interrupt);
- interrupt.addListener(new Button.ClickListener() {
+ interrupt.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
up.interruptUpload();
@@ -246,7 +246,7 @@ public class TestForUpload extends CustomComponent
main.addComponent(status);
final Button restart = new Button("R");
- restart.addListener(new Button.ClickListener() {
+ restart.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java b/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
index c12a70c04d..73e9e887ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -62,7 +62,7 @@ public class TestSetVisibleAndCaching
selectPanel(selectedPanel);
- buttonNextPanel.addListener(new ClickListener() {
+ buttonNextPanel.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
selectedPanel++;
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
index 6cde8350ed..584a952885 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -69,7 +69,7 @@ public class TestSizeableIncomponents extends LegacyApplication {
select.setWidth("400px");
prev = new Button("<<-|");
- prev.addListener(new Button.ClickListener() {
+ prev.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Object cur = select.getValue();
@@ -85,7 +85,7 @@ public class TestSizeableIncomponents extends LegacyApplication {
}
});
next = new Button("|->>");
- next.addListener(new Button.ClickListener() {
+ next.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Object cur = select.getValue();
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ErrorInUnloadEvent.java b/uitest/src/main/java/com/vaadin/tests/application/ErrorInUnloadEvent.java
index a09c4c845a..891e823336 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ErrorInUnloadEvent.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ErrorInUnloadEvent.java
@@ -50,7 +50,7 @@ public class ErrorInUnloadEvent extends AbstractTestCase {
formLayout.addComponent(login);
mainWindow.setContent(formLayout);
- login.addListener(new ClickListener() {
+ login.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
String username = userField.getValue();
@@ -82,7 +82,7 @@ public class ErrorInUnloadEvent extends AbstractTestCase {
title.addStyleName("header-title");
header.addComponent(title);
Button logout = new Button("Logout");
- logout.addListener(new ClickListener() {
+ logout.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
user = null;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
index f50be07af9..c3a8fcbbf5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
@@ -7,17 +7,15 @@ import java.util.LinkedHashMap;
import com.vaadin.ui.AbstractComponentContainer;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
-import com.vaadin.ui.HasComponents.ComponentAttachEvent;
+import com.vaadin.ui.DateField;
import com.vaadin.ui.HasComponents.ComponentAttachListener;
-import com.vaadin.ui.HasComponents.ComponentDetachEvent;
import com.vaadin.ui.HasComponents.ComponentDetachListener;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.InlineDateField;
import com.vaadin.ui.NativeButton;
-import com.vaadin.ui.DateField;
+import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalSplitPanel;
-import com.vaadin.ui.RichTextArea;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.TextArea;
import com.vaadin.v7.ui.TextField;
@@ -147,11 +145,11 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener(
- (ComponentAttachListener) AbstractComponentContainerTest.this);
+ c.addComponentAttachListener(
+ AbstractComponentContainerTest.this);
} else {
- c.removeListener(
- (ComponentAttachListener) AbstractComponentContainerTest.this);
+ c.removeComponentAttachListener(
+ AbstractComponentContainerTest.this);
}
}
};
@@ -161,11 +159,11 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener(
- (ComponentDetachListener) AbstractComponentContainerTest.this);
+ c.addComponentDetachListener(
+ AbstractComponentContainerTest.this);
} else {
- c.removeListener(
- (ComponentDetachListener) AbstractComponentContainerTest.this);
+ c.removeComponentDetachListener(
+ AbstractComponentContainerTest.this);
}
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
index 0e91dd9109..6cf544f16c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
@@ -15,8 +15,7 @@ public abstract class AbstractOrderedLayoutTest<T extends AbstractOrderedLayout>
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener(
- (LayoutClickListener) AbstractOrderedLayoutTest.this);
+ c.addLayoutClickListener(AbstractOrderedLayoutTest.this);
} else {
}
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 a82044bf57..3a27561284 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/FocusAndBlurListeners.java
@@ -15,9 +15,9 @@ import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.ui.OptionGroup;
-import com.vaadin.v7.ui.TextField;
public class FocusAndBlurListeners extends TestBase {
@@ -37,7 +37,6 @@ public class FocusAndBlurListeners extends TestBase {
Label msg = new Label(new Date() + " Blurred "
+ event.getComponent().getCaption());
messages.addComponentAsFirst(msg);
-
}
};
private VerticalLayout messages = new VerticalLayout();
@@ -72,7 +71,7 @@ public class FocusAndBlurListeners extends TestBase {
ogm.setMultiSelect(true);
l.addComponent(ogm);
- btn.addListener(new ClickListener() {
+ btn.addClickListener(new ClickListener() {
private int i;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
index 8f6f98fd89..3b331a23df 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
@@ -118,7 +118,7 @@ public class TouchScrollables extends TestBase {
final Table table = new Table();
Button button = new Button("Toggle lazyloading");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (table.getCacheRate() == 100) {
@@ -133,7 +133,7 @@ public class TouchScrollables extends TestBase {
cssLayout.addComponent(button);
button = new Button("Toggle selectable");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
table.setSelectable(!table.isSelectable());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonErrorMessage.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonErrorMessage.java
index b27f948669..38195a34ed 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonErrorMessage.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonErrorMessage.java
@@ -10,7 +10,7 @@ public class ButtonErrorMessage extends TestBase {
@Override
protected void setup() {
Button b = new Button("Click for error");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
throw new NullPointerException();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
index 0b1ab42667..d1ad20922c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
@@ -23,7 +23,7 @@ public class ButtonHtml extends TestBase {
addComponent(b);
final Button swapButton = new Button("<i>Swap button<i>");
- swapButton.addListener(new Button.ClickListener() {
+ swapButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
index 15e44f177d..d80fd028d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
@@ -32,7 +32,7 @@ public class ButtonIOSDragTest extends AbstractTestUI {
final VerticalLayout layout = new VerticalLayout();
Button offset = new Button("Drag me");
- offset.addListener(new ClickListener() {
+ offset.addClickListener(new ClickListener() {
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
Notification.show("Button clicked!");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons2.java b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons2.java
index 4f75dfbfef..df344b1a45 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons2.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons2.java
@@ -24,9 +24,9 @@ public class Buttons2<T extends Button> extends AbstractComponentTest<T>
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((Button.ClickListener) Buttons2.this);
+ c.addClickListener(Buttons2.this);
} else {
- c.removeListener((Button.ClickListener) Buttons2.this);
+ c.removeClickListener(Buttons2.this);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java b/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
index 025dfbb9c3..2a3d569671 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
@@ -41,8 +41,8 @@ public class ShortCutListenerModification extends TestBase
Button button1 = new Button("b1 (CTRL-C)");
Button button2 = new Button("b2 (CTRL-V)");
- button1.addListener(this);
- button2.addListener(this);
+ button1.addClickListener(this);
+ button2.addClickListener(this);
button1.setClickShortcut(KeyCode.C, ModifierKey.CTRL);
button2.setClickShortcut(KeyCode.V, ModifierKey.CTRL);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/TooltipForDisabledButton.java b/uitest/src/main/java/com/vaadin/tests/components/button/TooltipForDisabledButton.java
index c1f1846415..b4bafb05a2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/TooltipForDisabledButton.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/TooltipForDisabledButton.java
@@ -25,7 +25,7 @@ public class TooltipForDisabledButton extends TestBase {
buttonEnabled.setDescription("Tooltip for enabled");
buttonDisabled.setDescription("Tooltip for disabled");
- buttonDisabled.addListener(new Button.ClickListener() {
+ buttonDisabled.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -34,7 +34,7 @@ public class TooltipForDisabledButton extends TestBase {
});
- buttonEnabled.addListener(new Button.ClickListener() {
+ buttonEnabled.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
index 4938f24241..9ea835aac5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
@@ -27,7 +27,7 @@ public class ComboBoxCombinedWithEnterShortcut extends TestBase {
Button aButton = new Button("Show Value");
aButton.setClickShortcut(KeyCode.ENTER);
- aButton.addListener(new Button.ClickListener() {
+ aButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
index 40bdf0c7a1..09b84ba882 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
@@ -55,7 +55,7 @@ public class ComboBoxDataSourceChange extends TestBase {
state.addComponent(t);
Button b = new Button("Use ds1");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -71,7 +71,7 @@ public class ComboBoxDataSourceChange extends TestBase {
state.addComponent(t);
b = new Button("Use ds2");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInPopupView.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInPopupView.java
index ad70412e9f..93c62db9e5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInPopupView.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInPopupView.java
@@ -29,7 +29,7 @@ public class ComboBoxInPopupView extends TestBase {
final ComboBox cb2 = new ComboBox();
cb2.setWidth("260px");
PopupView pv2 = new PopupView("<u>2. focused (click)</u>", cb2);
- pv2.addListener(new PopupVisibilityListener() {
+ pv2.addPopupVisibilityListener(new PopupVisibilityListener() {
@Override
public void popupVisibilityChange(PopupVisibilityEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
index baf8f7487b..1a9c197365 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
@@ -23,7 +23,7 @@ public class ComboBoxSlowInFF extends TestBase {
}
Button fill = new Button("fill it");
- fill.addListener(new Button.ClickListener() {
+ fill.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
t.removeAllItems();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
index b8609de3e2..3a3a6bb3ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
@@ -20,7 +20,7 @@ public class RemovalOfSelectedIcon extends TestBase {
Button btClear = new Button("Clear button");
btClear.setImmediate(true);
- btClear.addListener(new Button.ClickListener() {
+ btClear.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentSizeUpdate.java b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentSizeUpdate.java
index 2351b02e2a..73080b4d2f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentSizeUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentSizeUpdate.java
@@ -18,7 +18,7 @@ public class CustomComponentSizeUpdate extends TestBase {
cc.setWidth("500px");
cc.setHeight("500px");
- nb.addListener(new ClickListener() {
+ nb.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
index 30a34e4fc4..5e9df766d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
@@ -58,7 +58,7 @@ public class DateFieldEmptyValid extends TestBase {
checkEmpty();
Button b = new Button("Clear date");
b.setId("clear");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -70,7 +70,7 @@ public class DateFieldEmptyValid extends TestBase {
b = new Button("Set date to 4.5.1990");
b.setId("set4.5.1990");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
@SuppressWarnings("deprecation")
@@ -82,7 +82,7 @@ public class DateFieldEmptyValid extends TestBase {
addComponent(b);
b = new Button("Set date to 5.6.2000 using a property data source");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
@SuppressWarnings("deprecation")
@@ -99,7 +99,7 @@ public class DateFieldEmptyValid extends TestBase {
b = new Button(
"Set date to 27.8.2005 by changing a new property data source from null, ds attached before value setting.");
b.setId("set-via-ds");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
@SuppressWarnings("deprecation")
@@ -115,7 +115,7 @@ public class DateFieldEmptyValid extends TestBase {
b = new Button("Check value");
b.setId("check-value");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
log.log("Checking state");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldReadOnly.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
index 339eff6972..84ac1c6106 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
@@ -46,7 +46,7 @@ public class DateFieldReadOnly extends AbstractTestUI {
addComponent(timeField);
Button b = new Button("Switch read-only");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
index 3225b0af9a..c581779b92 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
@@ -17,7 +17,7 @@ public class EmbeddedClickListenerRelativeCoordinates extends TestBase {
xLabel.setId("x");
final Label yLabel = new Label();
yLabel.setId("y");
- e.addListener(new ClickListener() {
+ e.addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
index 7632577227..9320e9ef6a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
@@ -44,7 +44,7 @@ public class EmbeddedImageRefresh extends TestBase {
// The button requests repainting the embedded.
Button button = new Button("refr");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
embedded.markAsDirty();
@@ -52,7 +52,7 @@ public class EmbeddedImageRefresh extends TestBase {
});
addComponent(button);
button = new Button("refr name");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
((StreamResource) embedded.getSource())
@@ -62,7 +62,7 @@ public class EmbeddedImageRefresh extends TestBase {
});
addComponent(button);
button = new Button("200x200");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
embedded.setWidth("200px");
@@ -71,7 +71,7 @@ public class EmbeddedImageRefresh extends TestBase {
});
addComponent(button);
button = new Button("undef");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
embedded.setSizeUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
index 78b4a9d417..764464c838 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
@@ -30,7 +30,7 @@ public class InsertRowInMiddle extends AbstractTestUI {
final GridLayout layout = new GridLayout(1, 2);
layout.addComponent(new Label("some row"), 0, 0);
Button newRowButton = new Button("Insert Row");
- newRowButton.addListener(new Button.ClickListener() {
+ newRowButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
layout.insertRow(1);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/LabelWrapping.java b/uitest/src/main/java/com/vaadin/tests/components/label/LabelWrapping.java
index 82969fdb08..2a20b46911 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/LabelWrapping.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/LabelWrapping.java
@@ -27,7 +27,7 @@ public class LabelWrapping extends TestBase {
final Label longLabel = new Label(longString);
Button changeLength = new Button("Change length");
- changeLength.addListener(new Button.ClickListener() {
+ changeLength.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (longLabel.getValue().equals(longString)) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
index c17fa15612..9fae2490b5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
@@ -18,7 +18,7 @@ public class NativeButtonHtml extends TestBase {
addComponent(b);
final NativeButton swapButton = new NativeButton("<i>Swap button<i>");
- swapButton.addListener(new Button.ClickListener() {
+ swapButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java
index 25bc05c771..f4d0c77428 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java
@@ -16,7 +16,7 @@ public class NotificationsAndModalWindow extends TestBase {
Notification.TYPE_WARNING_MESSAGE);
Button b = new Button("Button");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Window w = new Window("This is a window");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
index 79dc0a88ef..416e5c8d09 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
@@ -381,7 +381,7 @@ public class BoxLayoutTest extends AbstractTestUI {
l.addComponent(label);
l.addComponent(new Button("Component 2"));
- l.addListener(new LayoutClickListener() {
+ l.addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
if (event.getChildComponent() == null
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
index 6179694686..f55db0d0ee 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
@@ -58,7 +58,7 @@ public class LayoutClickListenerTest extends TestBase {
layout.addComponent(nestedLayout);
// Listen for layout click events
- layout.addListener(new LayoutClickListener() {
+ layout.addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.java
index a18400ce08..f18fb39fda 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ReplaceComponentNPE.java
@@ -25,7 +25,7 @@ public class ReplaceComponentNPE extends TestBase {
outer.setMargin(true);
Button changer = new Button("ReplaceComponent");
- changer.addListener(new Button.ClickListener() {
+ changer.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getLayout().replaceComponent(button, outer);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
index 7cc1d27e43..0e17a1729b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
@@ -13,7 +13,7 @@ public class PanelClickListenerRelativeCoordinates extends TestBase {
VerticalLayout panelLayout = new VerticalLayout();
panelLayout.setMargin(true);
Panel panel = new Panel("Panel's caption", panelLayout);
- panel.addListener(new ClickListener() {
+ panel.addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldNotScroll.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldNotScroll.java
index 15ca0d521e..e4f9eb46f0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldNotScroll.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldNotScroll.java
@@ -23,7 +23,7 @@ public class PanelShouldNotScroll extends TestBase {
p.setHeight("600px");
pl.addComponent(foo());
addMore = new Button("Add");
- addMore.addListener(new ClickListener() {
+ addMore.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
pl.removeComponent(addMore);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java b/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
index 97dd15f4b4..d343d9d85e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
@@ -21,7 +21,7 @@ public class ComboBoxAddWhileFiltering extends TestBase {
populate(comboBox);
Button b = new Button("add item (^N)");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
addItem(comboBox);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
index 5fa6860c34..0d75f654d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
@@ -1,7 +1,6 @@
package com.vaadin.tests.components.splitpanel;
import com.vaadin.server.Sizeable;
-import com.vaadin.server.Sizeable.Unit;
import com.vaadin.tests.components.AbstractComponentContainerTest;
import com.vaadin.ui.AbstractSplitPanel;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;
@@ -16,11 +15,9 @@ public abstract class AbstractSplitPanelTest<T extends AbstractSplitPanel>
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener(
- (SplitterClickListener) AbstractSplitPanelTest.this);
+ c.addSplitterClickListener(AbstractSplitPanelTest.this);
} else {
- c.removeListener(
- (SplitterClickListener) AbstractSplitPanelTest.this);
+ c.removeSplitterClickListener(AbstractSplitPanelTest.this);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
index 3025da57e7..9b86b1f95e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
@@ -39,7 +39,7 @@ public class SplitPanelExtraScrollbars extends AbstractTestCase
private Button createButton(String height) {
Button b = new NativeButton("A BIG button");
b.setHeight(height);
- b.addListener(this);
+ b.addClickListener(this);
return b;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
index 88654b8ffc..e5ebef01fa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
@@ -25,12 +25,14 @@ public class SplitPanelReversePosition extends TestBase {
hsplit.setSizeFull();
hsplit.setImmediate(true);
hsplit.setSplitPosition(100, Sizeable.UNITS_PIXELS, hsplitReversed);
- hsplit.addListener(new HorizontalSplitPanel.SplitterClickListener() {
- @Override
- public void splitterClick(SplitterClickEvent event) {
- getMainWindow().showNotification("Horizontal Splitter Clicked");
- }
- });
+ hsplit.addSplitterClickListener(
+ new HorizontalSplitPanel.SplitterClickListener() {
+ @Override
+ public void splitterClick(SplitterClickEvent event) {
+ getMainWindow().showNotification(
+ "Horizontal Splitter Clicked");
+ }
+ });
TextArea area = new TextArea("");
area.setSizeFull();
@@ -40,7 +42,7 @@ public class SplitPanelReversePosition extends TestBase {
vsplit.setSizeFull();
vsplit.setImmediate(true);
vsplit.setSplitPosition(10, Sizeable.UNITS_PERCENTAGE, vsplitReversed);
- vsplit.addListener(new SplitterClickListener() {
+ vsplit.addSplitterClickListener(new SplitterClickListener() {
@Override
public void splitterClick(SplitterClickEvent event) {
getMainWindow().showNotification("Vertical Splitter Clicked");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AddNonRenderedRow.java b/uitest/src/main/java/com/vaadin/tests/components/table/AddNonRenderedRow.java
index b73e71bc45..3ec2a430aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/AddNonRenderedRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/AddNonRenderedRow.java
@@ -21,7 +21,7 @@ public class AddNonRenderedRow extends TestBase {
}
Button addrowButton = new Button("Add row");
- addrowButton.addListener(new ClickListener() {
+ addrowButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent pEvent) {
addRow();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.java b/uitest/src/main/java/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.java
index 555ba7eaab..0807f7946b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ContainerChangeWithPartlySamePropertyIds.java
@@ -67,7 +67,7 @@ public class ContainerChangeWithPartlySamePropertyIds extends TestBase {
public TableTestComponent() {
Button switchContainerButton = new Button("switch container");
- switchContainerButton.addListener(new ClickListener() {
+ switchContainerButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (testTable.getContainerDataSource() == containerA) {
@@ -80,7 +80,7 @@ public class ContainerChangeWithPartlySamePropertyIds extends TestBase {
this.addComponent(switchContainerButton);
Button clearButton = new Button("clear (click twice)");
- clearButton.addListener(new ClickListener() {
+ clearButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
try {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
index 0fd201fc9a..c4df124a15 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
@@ -47,7 +47,7 @@ public class MultiSelectWithRemovedRow extends TestBase {
addComponent(table);
Button showButton = new Button("Show selection");
- showButton.addListener(new Button.ClickListener() {
+ showButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
Collection<?> selection = (Collection<?>) table.getValue();
@@ -57,7 +57,7 @@ public class MultiSelectWithRemovedRow extends TestBase {
addComponent(showButton);
Button removeButton = new Button("Remove selection");
- removeButton.addListener(new Button.ClickListener() {
+ removeButton.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
Collection<?> selection = (Collection<?>) table.getValue();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ScrollDetachSynchronization.java b/uitest/src/main/java/com/vaadin/tests/components/table/ScrollDetachSynchronization.java
index 14ec0e6412..4f5f088a16 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ScrollDetachSynchronization.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ScrollDetachSynchronization.java
@@ -45,7 +45,7 @@ public class ScrollDetachSynchronization extends TestBase {
mainLayout.addComponent(firstLayout);
mainLayout.setExpandRatio(firstLayout, 1);
- first.addListener(new Button.ClickListener() {
+ first.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -55,7 +55,7 @@ public class ScrollDetachSynchronization extends TestBase {
}
}
});
- second.addListener(new Button.ClickListener() {
+ second.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java b/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java
index 12f677d60d..439ebf6975 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java
@@ -29,7 +29,7 @@ public class SetCurrentPageFirstItemId extends TestBase {
}
Button addrowButton = new Button("Add row");
- addrowButton.addListener(new ClickListener() {
+ addrowButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent pEvent) {
Object id = addRow();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
index 185a7e3d67..a559e8f743 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
@@ -44,7 +44,7 @@ public class TableContextMenuOnField extends TestBase {
VerticalLayout layout = new VerticalLayout();
layout.addComponent(new TextField());
- layout.addListener(new LayoutClickListener() {
+ layout.addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
index 6750b152aa..0d39d211d3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
@@ -25,7 +25,7 @@ public class TableModifcationsWhenScrolledRight extends TestBase {
}
t.addItem(row).getItemProperty("name").setValue("Row" + row);
- btn.addListener(new ClickListener() {
+ btn.addClickListener(new ClickListener() {
Integer row = 2;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
index 93bd94b774..abc549e4bd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
@@ -64,7 +64,7 @@ public class TableReduceContainerSize extends TestBase {
final Label label = new Label();
addComponent(label);
Button button = new Button("Click");
- button.addListener(new Button.ClickListener() {
+ button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
try {
@@ -80,7 +80,7 @@ public class TableReduceContainerSize extends TestBase {
});
addComponent(button);
Button button2 = new Button("Filter");
- button2.addListener(new Button.ClickListener() {
+ button2.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
try {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
index c83964a829..0410b23996 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
@@ -138,7 +138,7 @@ public class TableToggleVisibility extends AbstractTestCase {
setCaption("- " + table.getCaption());
- addListener(new ClickListener() {
+ addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
index 45890ced73..3dd2d0cd0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
@@ -48,7 +48,7 @@ public class RemoveTabs extends TestBase {
getLayout().addComponent(tabsheet);
closeCurrent = new Button("Close current tab");
- closeCurrent.addListener(new Button.ClickListener() {
+ closeCurrent.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
closeCurrentTab();
@@ -57,7 +57,7 @@ public class RemoveTabs extends TestBase {
});
closeCurrentWithTab = new Button("Close current tab with Tab");
- closeCurrentWithTab.addListener(new Button.ClickListener() {
+ closeCurrentWithTab.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
closeCurrentTabWithTab();
@@ -66,7 +66,7 @@ public class RemoveTabs extends TestBase {
});
closeFirst = new Button("close first tab");
- closeFirst.addListener(new Button.ClickListener() {
+ closeFirst.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
closeFirstTab();
@@ -75,7 +75,7 @@ public class RemoveTabs extends TestBase {
});
closeLast = new Button("close last tab");
- closeLast.addListener(new Button.ClickListener() {
+ closeLast.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
closeLastTab();
@@ -84,7 +84,7 @@ public class RemoveTabs extends TestBase {
});
reorderTabs = new Button("reorder");
- reorderTabs.addListener(new Button.ClickListener() {
+ reorderTabs.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
reorder();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
index ece3693bfd..3910b3a4f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
@@ -66,9 +66,9 @@ public class TabSheetTest<T extends TabSheet> extends
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((SelectedTabChangeListener) TabSheetTest.this);
+ c.addSelectedTabChangeListener(TabSheetTest.this);
} else {
- c.removeListener((SelectedTabChangeListener) TabSheetTest.this);
+ c.removeSelectedTabChangeListener(TabSheetTest.this);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNPE.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNPE.java
index 0aa10662fa..9e469ba77c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNPE.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNPE.java
@@ -44,7 +44,7 @@ public class TabsheetNPE extends AbstractTestCase implements ClickListener {
layout.addComponent(tabSheet);
Button btn = new Button("Enable and activate tab");
- btn.addListener(this);
+ btn.addClickListener(this);
layout.addComponent(btn);
return layout;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
index a588e9c862..3fd15ecdcc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
@@ -25,7 +25,7 @@ public class ScrollCursor extends TestBase {
+ "ds\n" + "fds\n" + "fds\nfs");
addComponent(textArea);
Button button = new Button("Scroll");
- button.addListener(new ClickListener() {
+ button.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -33,7 +33,7 @@ public class ScrollCursor extends TestBase {
}
});
Button wrap = new Button("Set wrap");
- wrap.addListener(new ClickListener() {
+ wrap.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -42,7 +42,7 @@ public class ScrollCursor extends TestBase {
});
Button toBegin = new Button("To begin");
- toBegin.addListener(new ClickListener() {
+ toBegin.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -51,7 +51,7 @@ public class ScrollCursor extends TestBase {
});
Button toMiddle = new Button("To middle");
- toMiddle.addListener(new ClickListener() {
+ toMiddle.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -60,7 +60,7 @@ public class ScrollCursor extends TestBase {
});
Button toEnd = new Button("To end");
- toEnd.addListener(new ClickListener() {
+ toEnd.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
index 79239da7e7..9ffc7cce38 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
@@ -23,7 +23,7 @@ public class TextFieldWithProperty extends TestBase {
Button b = new Button(
"Set BAR to underlaying property (should propagate to UI)");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
op.setValue("BAR");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.java
index 58f542ccfb..9967980d16 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithPropertyFormatter.java
@@ -95,14 +95,14 @@ public class TextFieldWithPropertyFormatter extends TestBase {
Button b = new Button(
"Sync (typing 12345.6789 and clicking this should format field)");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
}
});
addComponent(b);
b = new Button("Set '12345.6789' to textfield on the server side");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
tf1.setValue("12345.6789");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeContainerChange.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeContainerChange.java
index d6167b4bff..be260ef30f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeContainerChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeContainerChange.java
@@ -55,7 +55,7 @@ public class TreeContainerChange extends TestBase {
state.addComponent(t);
Button b = new Button("Use ds1");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -71,7 +71,7 @@ public class TreeContainerChange extends TestBase {
state.addComponent(t);
b = new Button("Use ds2");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
index 92b14e33c4..a3e73bd40c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
@@ -20,21 +20,21 @@ public class ChangeDataSourcePageLengthZero extends TestBase {
setupContainer(tt, 20);
addComponent(tt);
Button page1 = new Button("Set new data source (20 items)");
- page1.addListener(new Button.ClickListener() {
+ page1.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
setupContainer(tt, 20);
}
});
Button page2 = new Button("Set new data source (10 items)");
- page2.addListener(new Button.ClickListener() {
+ page2.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
setupContainer(tt, 10);
}
});
Button addButton = new Button("Add item");
- addButton.addListener(new Button.ClickListener() {
+ addButton.addClickListener(new Button.ClickListener() {
private int i = 1;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
index 64a7e34fcc..8e5b30639c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -50,7 +50,7 @@ public class RemoveAllItemsRefresh extends TestBase {
addComponent(treeLayout);
Button cleanUp = new Button("clear");
- cleanUp.addListener(new ClickListener() {
+ cleanUp.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
treeContainer.removeAllItems();
@@ -59,7 +59,7 @@ public class RemoveAllItemsRefresh extends TestBase {
addComponent(cleanUp);
Button refresh = new Button("fill");
- refresh.addListener(new ClickListener() {
+ refresh.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
fill();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
index 95f215b66b..e3000e8fb7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
@@ -23,7 +23,7 @@ public class RowHeightWithoutRows extends TestBase {
Button refresh = new Button("Add two elements");
addComponent(refresh);
- refresh.addListener(new ClickListener() {
+ refresh.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
addTwoElements();
}
@@ -31,7 +31,7 @@ public class RowHeightWithoutRows extends TestBase {
Button reset = new Button("Reset");
addComponent(reset);
- reset.addListener(new ClickListener() {
+ reset.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
container.removeAllItems();
}
@@ -39,7 +39,7 @@ public class RowHeightWithoutRows extends TestBase {
Button refresh5 = new Button("Add five elements");
addComponent(refresh5);
- refresh5.addListener(new ClickListener() {
+ refresh5.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
container.addBean(new User("John", "Doe"));
container.addBean(new User("Mark", "Twain"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
index bcad8589d6..55b93c609f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
@@ -17,12 +17,14 @@ public class UriFragment extends AbstractTestUI {
fragmentLabel.setId("fragmentLabel");
addComponent(fragmentLabel);
updateLabel();
- getPage().addListener(new Page.UriFragmentChangedListener() {
- @Override
- public void uriFragmentChanged(UriFragmentChangedEvent event) {
- updateLabel();
- }
- });
+ getPage().addUriFragmentChangedListener(
+ new Page.UriFragmentChangedListener() {
+ @Override
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent event) {
+ updateLabel();
+ }
+ });
addComponent(createButton("test", "Navigate to #test", "test"));
addComponent(createButton("empty", "Navigate to #", ""));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/ForceSubmit.java b/uitest/src/main/java/com/vaadin/tests/components/upload/ForceSubmit.java
index 671e46e4d7..4b0b8e99c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/ForceSubmit.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/ForceSubmit.java
@@ -40,7 +40,7 @@ public class ForceSubmit extends TestBase implements Receiver {
addComponent(u);
- u.addListener(new Upload.FinishedListener() {
+ u.addFinishedListener(new Upload.FinishedListener() {
@Override
public void uploadFinished(FinishedEvent event) {
String filename = event.getFilename();
@@ -50,14 +50,14 @@ public class ForceSubmit extends TestBase implements Receiver {
}
});
- u.addListener(new Upload.FailedListener() {
+ u.addFailedListener(new Upload.FailedListener() {
@Override
public void uploadFailed(FailedEvent event) {
getMainWindow().showNotification("Failed. No file selected?");
}
});
- u.addListener(new Upload.StartedListener() {
+ u.addStartedListener(new Upload.StartedListener() {
@Override
public void uploadStarted(StartedEvent event) {
getMainWindow().showNotification(
@@ -67,7 +67,7 @@ public class ForceSubmit extends TestBase implements Receiver {
Button button = new Button(
"I'm an external button (not the uploads builtin), hit me to start upload.");
- button.addListener(new ClickListener() {
+ button.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
u.submitUpload();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadFilename.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadFilename.java
index de0cca5009..41f4f31588 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadFilename.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadFilename.java
@@ -22,7 +22,7 @@ public class TestUploadFilename extends TestBase {
addComponent(upload);
addComponent(result);
- upload.addListener(new Upload.FinishedListener() {
+ upload.addFinishedListener(new Upload.FinishedListener() {
@Override
public void uploadFinished(FinishedEvent event) {
result.setValue("Got file (should not contain path): "
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java b/uitest/src/main/java/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java
index 455fb2e531..bd0cb109b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java
@@ -89,7 +89,7 @@ public class AttachShouldBeCalledForSubWindows extends AbstractTestCase {
log(this);
}
};
- okButton.addListener(new ClickListener() {
+ okButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ExecuteJavaScript.java b/uitest/src/main/java/com/vaadin/tests/components/window/ExecuteJavaScript.java
index 8184d10d85..1a54c399d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ExecuteJavaScript.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ExecuteJavaScript.java
@@ -27,7 +27,7 @@ public class ExecuteJavaScript extends AbstractTestCase {
private Button createScriptButton(final String script) {
Button b = new Button(script);
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java b/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java
index 70d83a466b..cf9eb1b9eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java
@@ -70,10 +70,10 @@ public class LazyWindowResize extends AbstractTestCase {
resizeListenerCheckBox.setImmediate(true);
resizeListenerCheckBox.addValueChangeListener(event -> {
if (resizeListenerCheckBox.getValue()) {
- subWindow.addListener(resizeListener);
+ subWindow.addResizeListener(resizeListener);
mainWindow.addListener(browserWindowResizeListener);
} else {
- subWindow.removeListener(resizeListener);
+ subWindow.removeResizeListener(resizeListener);
mainWindow.removeListener(browserWindowResizeListener);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
index f4dae2aa75..6b92a4b1eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
@@ -63,8 +63,8 @@ public class SubWindowOrder extends TestBase {
addComponent(winSel);
addComponent(bf);
addComponent(toggleModality);
- bf.addListener(this);
- toggleModality.addListener(this);
+ bf.addClickListener(this);
+ toggleModality.addClickListener(this);
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
index 8b705a418b..8ef94a2465 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
@@ -40,22 +40,23 @@ public class SubWindowWithUndefinedHeight extends TestBase {
final TabSheet tabsheet = new TabSheet();
tabsheet.addComponent(tabButton);
tabsheet.addComponent(table);
- tabsheet.addListener(new TabSheet.SelectedTabChangeListener() {
- @Override
- public void selectedTabChange(
- TabSheet.SelectedTabChangeEvent event) {
- if (tabsheet.getSelectedTab() == tabButton) {
- tabsheet.setSizeUndefined();
- layout.setSizeUndefined();
- subwindow.setSizeUndefined();
- } else if (tabsheet.getSelectedTab() == table) {
- subwindow.setWidth("500px");
- subwindow.setHeight("500px");
- layout.setSizeFull();
- tabsheet.setSizeFull();
- }
- }
- });
+ tabsheet.addSelectedTabChangeListener(
+ new TabSheet.SelectedTabChangeListener() {
+ @Override
+ public void selectedTabChange(
+ TabSheet.SelectedTabChangeEvent event) {
+ if (tabsheet.getSelectedTab() == tabButton) {
+ tabsheet.setSizeUndefined();
+ layout.setSizeUndefined();
+ subwindow.setSizeUndefined();
+ } else if (tabsheet.getSelectedTab() == table) {
+ subwindow.setWidth("500px");
+ subwindow.setHeight("500px");
+ layout.setSizeFull();
+ tabsheet.setSizeFull();
+ }
+ }
+ });
layout.addComponent(tabsheet);
Button button = new Button("click me", new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindows.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindows.java
index 38cb1412a2..62443f43cd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindows.java
@@ -31,7 +31,7 @@ public class SubWindows extends TestBase {
private Component createRemoveButton() {
Button b = new Button("Remove");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowClickEvents.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowClickEvents.java
index 00cd580ed8..65a6256b89 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowClickEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowClickEvents.java
@@ -28,7 +28,7 @@ public class WindowClickEvents extends TestBase {
@Override
protected void setup() {
VerticalLayout layout = new VerticalLayout();
- layout.addListener(new LayoutClickListener() {
+ layout.addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
WindowClickEvents.this.click("Sub window layout", event);
@@ -36,7 +36,7 @@ public class WindowClickEvents extends TestBase {
});
((VerticalLayout) getMainWindow().getContent())
- .addListener(new LayoutClickListener() {
+ .addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
WindowClickEvents.this.click("Main window layout",
@@ -45,7 +45,7 @@ public class WindowClickEvents extends TestBase {
});
layout.setMargin(true);
Window centered = new Window("A window with a click listener", layout);
- centered.addListener(new ClickListener() {
+ centered.addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
@@ -61,7 +61,7 @@ public class WindowClickEvents extends TestBase {
l.setSizeUndefined();
Button b = new Button(
"Clicking here should not produce a layout click event");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
@@ -75,7 +75,7 @@ public class WindowClickEvents extends TestBase {
getMainWindow().addWindow(centered);
log = new Log(5);
addComponent(log);
- getMainWindow().addListener(new ClickListener() {
+ getMainWindow().addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java
index a662ee7175..3a9b4a9315 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java
@@ -80,7 +80,7 @@ class ResizeListenerWindow extends Window {
hl.addComponent(new Label("Current size: "));
hl.addComponent(sizeLabel);
- addListener(new ResizeListener() {
+ addResizeListener(new ResizeListener() {
@Override
public void windowResized(ResizeEvent e) {
updateLabel();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingUp.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingUp.java
index dd78f6e154..2c3eb75244 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingUp.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingUp.java
@@ -24,7 +24,7 @@ public class WindowScrollingUp extends AbstractTestCase {
table.setPageLength(50);
final Button up = new Button("up");
- up.addListener(new Button.ClickListener() {
+ up.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
index 5013c6e220..9390f068cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
@@ -34,7 +34,7 @@ public class MassInsertMemoryLeakTestApp extends LegacyApplication {
public void init() {
setMainWindow(new LegacyWindow("SQLContainer Test", buildLayout()));
- process.addListener(new Button.ClickListener() {
+ process.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
MassInsert mi = new MassInsert();
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
index 86f47ac505..502b476f3c 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
@@ -498,7 +498,7 @@ public class DDTest6 extends TestBase {
l.addComponent(new Embedded(null, icon2));
l.addComponent(new Label(name));
- l.addListener(new LayoutClickListener() {
+ l.addLayoutClickListener(new LayoutClickListener() {
@Override
@SuppressWarnings("static-access")
public void layoutClick(LayoutClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
index 827e3be162..9795973e93 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
@@ -57,7 +57,7 @@ public abstract class AbstractBeanFieldGroupTest extends TestBase {
protected Button getCommitButton() {
if (commitButton == null) {
commitButton = new Button("Commit");
- commitButton.addListener(new ClickListener() {
+ commitButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
index c0ffcca0df..f0e3f300d7 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
@@ -60,7 +60,7 @@ public class CaptionsInLayouts extends AbstractTestUI {
private Component addCaptionText() {
Button b = new Button("Add caption text");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
index 957821a450..82752d67d4 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
@@ -68,7 +68,7 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component addCaptionText() {
Button b = new Button("Add caption text");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java b/uitest/src/main/java/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
index 33ccda1a4b..2c670661fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
@@ -44,7 +44,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
gl.addComponent(b2, 0, 2);
b1.setWidth(270, Sizeable.UNITS_PIXELS);
b2.setWidth(270, Sizeable.UNITS_PIXELS);
- b1.addListener(new Button.ClickListener() {
+ b1.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
cols++;
@@ -70,7 +70,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
mainLayout.setExpandRatio(gl, 100);
Button restart = new Button("restart");
mainLayout.addComponent(restart);
- restart.addListener(new Button.ClickListener() {
+ restart.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
close();
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
index 60519cf1c0..77e49f4a87 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
@@ -52,7 +52,7 @@ public class CssLayoutCustomCss extends TestBase implements ClickListener {
private Button createButton(String string) {
NativeButton button = new NativeButton(string);
css.put(button, string);
- button.addListener(this);
+ button.addClickListener(this);
return button;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java
index ed3c5e66d3..b8f898e1f3 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java
@@ -32,7 +32,7 @@ public class CssLayoutSizeChangePropagation extends TestBase {
sp.addComponent(cssLayout);
Button button = new Button("b");
- button.addListener(new ClickListener() {
+ button.addClickListener(new ClickListener() {
boolean bool = true;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/DeepComponentTrees.java b/uitest/src/main/java/com/vaadin/tests/layouts/DeepComponentTrees.java
index c985117ab6..0306aea7f6 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/DeepComponentTrees.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/DeepComponentTrees.java
@@ -44,7 +44,7 @@ public class DeepComponentTrees extends TestBase {
root.setWidth("600px");
root.setHeight("200px");
final Button b = new Button("Go try your luck with " + i + " layouts!");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutNPE.java b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutNPE.java
index 3531a4e13c..7e60b06ab0 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutNPE.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutNPE.java
@@ -29,7 +29,7 @@ public class GridLayoutNPE extends TestBase {
lo.addComponent(b);
lo.addComponent(b2);
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
@@ -49,7 +49,7 @@ public class GridLayoutNPE extends TestBase {
});
- b2.addListener(new Button.ClickListener() {
+ b2.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java
index 5e187d1f79..1dc63f1240 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java
@@ -21,7 +21,7 @@ public class MovingInvisibleField extends TestBase {
"A visible text field");
tfHidden.setVisible(false);
Button b = new Button("Move hidden textfield to other layout");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutPerformance.java b/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutPerformance.java
index 72be418a22..65550cf651 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutPerformance.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutPerformance.java
@@ -63,7 +63,7 @@ public class TestLayoutPerformance extends TestBase {
Button b = new Button("Render component");
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
index d00acf0983..2a9892ad18 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
@@ -41,7 +41,7 @@ public class VerticalLayoutWithRelativeSizeComponentsInitiallyHidden
Button b = new Button(
"Click to set bar visible. Button should stay visible.");
- b.addListener(new ClickListener() {
+ b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
index 2c3e3360fe..62fd78a06f 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -47,12 +47,14 @@ public class UsingUriFragments extends UI {
layout.addComponent(label);
// React to fragment changes
- getPage().addListener(new UriFragmentChangedListener() {
- @Override
- public void uriFragmentChanged(UriFragmentChangedEvent source) {
- handleFragment(source.getUriFragment());
- }
- });
+ getPage().addUriFragmentChangedListener(
+ new UriFragmentChangedListener() {
+ @Override
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent source) {
+ handleFragment(source.getUriFragment());
+ }
+ });
// Handle the fragment received in the initial request
handleFragment(getPage().getUriFragment());
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java b/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
index 88ca1cf5b6..81aa197a48 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
@@ -21,7 +21,7 @@ public class NonExistingFileResource extends TestBase {
private Button createButton(final String filename) {
Button b = new Button("Download " + filename);
- b.addListener(new Button.ClickListener() {
+ b.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {