summaryrefslogtreecommitdiffstats
path: root/test/widget-set-testutil
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-26 21:19:41 +0200
committerPekka Maanpää <pekkamaa@vaadin.com>2017-10-26 22:19:41 +0300
commit01c93a6aef27ef562267d7966c6386ecaa6c1f6b (patch)
tree438810691e69e7751710917c251c2ba677c969d4 /test/widget-set-testutil
parent10bd7544fd22dccd7e8e32cb236eb50f102892d3 (diff)
downloadvaadin-framework-01c93a6aef27ef562267d7966c6386ecaa6c1f6b.tar.gz
vaadin-framework-01c93a6aef27ef562267d7966c6386ecaa6c1f6b.zip
Use lambda with Listeners (#10222)
Also use "event" as the name for events
Diffstat (limited to 'test/widget-set-testutil')
-rw-r--r--test/widget-set-testutil/src/main/java/com/vaadin/test/widgetset/AbstractTestWidgetSetUI.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/widget-set-testutil/src/main/java/com/vaadin/test/widgetset/AbstractTestWidgetSetUI.java b/test/widget-set-testutil/src/main/java/com/vaadin/test/widgetset/AbstractTestWidgetSetUI.java
index c03645517a..b11125cfcc 100644
--- a/test/widget-set-testutil/src/main/java/com/vaadin/test/widgetset/AbstractTestWidgetSetUI.java
+++ b/test/widget-set-testutil/src/main/java/com/vaadin/test/widgetset/AbstractTestWidgetSetUI.java
@@ -2,7 +2,6 @@ package com.vaadin.test.widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI;
@@ -19,13 +18,9 @@ public abstract class AbstractTestWidgetSetUI extends UI {
name.setCaption("Type your name here:");
Button button = new Button("Click Me");
- button.addClickListener(new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent clickEvent) {
- layout.addComponent(
- new Label("Thanks " + name.getValue() + ", it works!"));
- }
- });
+ button.addClickListener(
+ event -> new Label(
+ "Thanks " + name.getValue() + ", it works!"));
getPage().getJavaScript().execute(
"widgetsetinfo.innerText=document.querySelector('iframe').id;");