From 4a4d05b0354829df86c4f106868d421dca349b34 Mon Sep 17 00:00:00 2001 From: Marko Gronroos Date: Mon, 25 Jul 2016 00:00:36 +0300 Subject: Rescaled images in layout chapter. Various small formatting fixes. Updated history and other matters in introduction. Change-Id: I0d5e76f7fb07f967dd04941a23e79dfb30049731 --- .../introduction/intro-walkthrough.asciidoc | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'documentation/introduction/intro-walkthrough.asciidoc') diff --git a/documentation/introduction/intro-walkthrough.asciidoc b/documentation/introduction/intro-walkthrough.asciidoc index 152817c0ed..ad3519ccd7 100644 --- a/documentation/introduction/intro-walkthrough.asciidoc +++ b/documentation/introduction/intro-walkthrough.asciidoc @@ -31,12 +31,7 @@ public class HelloWorld extends UI { // Have a clickable button content.addComponent(new Button("Push Me!", - new ClickListener() { - @Override - public void buttonClick(ClickEvent e) { - Notification.show("Pushed!"); - } - })); + click -> Notification.show("Pushed!"))); } } ---- @@ -59,18 +54,8 @@ user interface component, which displays simple text, and sets the text to The example also shows how to create a button and handle button click events. Event handling is described in -<> and on the practical side in -<>. In addition to listeners, in Java 8 you can handle -events with lambda expressions, which simplifies the handler code significantly. - - -[source, java] ----- -content.addComponent(new Button("Push Me!", - event -> Notification.show("Pushed!"))); ----- +<> and on the practical side in <>. +In Java 8, you can implement listeners with lambda expressions, which simplifies the handler code significantly. The result of the Hello World application, when opened in a browser, is shown in <>. -- cgit v1.2.3