diff options
author | Leif Åstrand <leif@vaadin.com> | 2011-11-02 13:52:43 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2011-11-02 13:52:43 +0200 |
commit | 09be19b3bb1639e1cb13f98230d00d1ea9cf0560 (patch) | |
tree | 2d4b10f2ba629b6b014d7a6c5938b63cf5e85ef5 /src/com/vaadin/RootTestApplication.java | |
parent | 8c57baf16df0e064416506205cecd542269a3c72 (diff) | |
download | vaadin-framework-09be19b3bb1639e1cb13f98230d00d1ea9cf0560.tar.gz vaadin-framework-09be19b3bb1639e1cb13f98230d00d1ea9cf0560.zip |
Restored functionality related to subwindows and focus in Root
Diffstat (limited to 'src/com/vaadin/RootTestApplication.java')
-rw-r--r-- | src/com/vaadin/RootTestApplication.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/com/vaadin/RootTestApplication.java b/src/com/vaadin/RootTestApplication.java index c64712ccd6..b9707ce6fc 100644 --- a/src/com/vaadin/RootTestApplication.java +++ b/src/com/vaadin/RootTestApplication.java @@ -1,17 +1,26 @@ package com.vaadin; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.DefaultRoot; import com.vaadin.ui.Label; import com.vaadin.ui.Root; +import com.vaadin.ui.Window; public class RootTestApplication extends Application { - private final Root root = new DefaultRoot(this, new Label( - "Roots, bloody roots")); + private final Root root = new DefaultRoot(new Button("Roots, bloody roots", + new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + Window subWindow = new Window("Sub window"); + subWindow.addComponent(new Label("More roots")); + root.addWindow(subWindow); + } + })); @Override public void init() { - // TODO Auto-generated method stub - + // TODO Should be done by Application during init + root.setApplication(this); } @Override |