diff options
author | Marko Gronroos <magi@vaadin.com> | 2016-07-25 00:00:36 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-05 10:19:47 +0300 |
commit | 4a4d05b0354829df86c4f106868d421dca349b34 (patch) | |
tree | db70be8fce2298dbf427775f07b1146e82c66e33 /documentation/introduction/intro-walkthrough.asciidoc | |
parent | 3ea6a0087b140a13ed0685afa2ffe08a45b82719 (diff) | |
download | vaadin-framework-4a4d05b0354829df86c4f106868d421dca349b34.tar.gz vaadin-framework-4a4d05b0354829df86c4f106868d421dca349b34.zip |
Rescaled images in layout chapter. Various small formatting fixes. Updated history and other matters in introduction.
Change-Id: I0d5e76f7fb07f967dd04941a23e79dfb30049731
Diffstat (limited to 'documentation/introduction/intro-walkthrough.asciidoc')
-rw-r--r-- | documentation/introduction/intro-walkthrough.asciidoc | 21 |
1 files changed, 3 insertions, 18 deletions
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 -<<dummy/../../../framework/architecture/architecture-events#architecture.events,"Events -and Listeners">> and on the practical side in -<<dummy/../../../framework/application/application-events#application.events,"Handling -Events with Listeners">>. 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!"))); ----- +<<dummy/../../../framework/architecture/architecture-events#architecture.events,"Events and Listeners">> and on the practical side in <<dummy/../../../framework/application/application-events#application.events,"Handling Events with Listeners">>. +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 <<figure.intro.walkthrough>>. |