aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/RootTestApplication.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/RootTestApplication.java')
-rw-r--r--src/com/vaadin/RootTestApplication.java17
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