From 23501be1977298298642260e2e4d527ad7650605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 25 Sep 2011 13:00:23 +0200 Subject: use Application.setLogoutURL and Application.close --- vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java index 5c35f6c..c0923f6 100644 --- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java +++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java @@ -28,6 +28,16 @@ public class HelloWorldApp extends Application { } })); // + Button closeButton = new Button("close the application"); + mainWindow.addComponent(closeButton ); + closeButton.addListener( new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + getMainWindow().getApplication().close(); + } + }); + // setMainWindow(mainWindow); + setLogoutURL("http://asynk.ch"); } } -- cgit v1.1-2-g2b99