diff options
author | Marko Grönroos <magi@iki.fi> | 2009-05-28 13:51:10 +0000 |
---|---|---|
committer | Marko Grönroos <magi@iki.fi> | 2009-05-28 13:51:10 +0000 |
commit | 7c1b1615289a24ec16fcbbb511348b84f144a1d4 (patch) | |
tree | 70bbfe46d04a521bc30accb3b33a3c5f8ee6a90a /src/com/vaadin/tests | |
parent | 159a3ba44e980fe1e173f8da1beb9f15d5598058 (diff) | |
download | vaadin-framework-7c1b1615289a24ec16fcbbb511348b84f144a1d4.tar.gz vaadin-framework-7c1b1615289a24ec16fcbbb511348b84f144a1d4.zip |
Initial Book example for AbsoluteLayout.
svn changeset:8067/svn branch:6.0
Diffstat (limited to 'src/com/vaadin/tests')
-rw-r--r-- | src/com/vaadin/tests/book/BookTestApplication.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/com/vaadin/tests/book/BookTestApplication.java b/src/com/vaadin/tests/book/BookTestApplication.java index a4c423e82f..d80dccb901 100644 --- a/src/com/vaadin/tests/book/BookTestApplication.java +++ b/src/com/vaadin/tests/book/BookTestApplication.java @@ -29,6 +29,7 @@ import com.vaadin.terminal.StreamResource; import com.vaadin.terminal.URIHandler; import com.vaadin.terminal.UserError; import com.vaadin.terminal.gwt.server.WebApplicationContext; +import com.vaadin.ui.AbsoluteLayout; import com.vaadin.ui.AbstractSelect; import com.vaadin.ui.Button; import com.vaadin.ui.CheckBox; @@ -80,7 +81,9 @@ public class BookTestApplication extends com.vaadin.Application { setTheme("tests-book"); setMainWindow(main); - + + main.getContent().setSizeFull(); + // Demo the use of parameter and URI handlers main.addParameterHandler(new MyParameterHandler()); main.addURIHandler(new MyURIHandler()); @@ -154,7 +157,8 @@ public class BookTestApplication extends com.vaadin.Application { "progress/window", "progress/thread", "progress", "customlayout", "spacing", "margin", "clientinfo", "fillinform/templates", "notification", "print", - "richtextfield", "querycontainer", "menubar" }; + "richtextfield", "querycontainer", "menubar", + "absolutelayout"}; for (int i = 0; i < examples.length; i++) { grid.addComponent(new Label("<a href='" + context.toString() + examples[i] + "'>" @@ -239,6 +243,8 @@ public class BookTestApplication extends com.vaadin.Application { example_QueryContainer(main, param); } else if (example.equals("menubar")) { example_MenuBar(main, param); + } else if (example.equals("absolutelayout")) { + example_AbsoluteLayout(main, param); } else { ; // main.addComponent(new // Label("Unknown test '"+example+"'.")); @@ -1763,4 +1769,14 @@ public class BookTestApplication extends com.vaadin.Application { MenuBar.MenuItem services = menubar.addItem("Services", null, null); services.addItem("Car Service", null, mycommand); } + + void example_AbsoluteLayout(final Window main, String param) { + AbsoluteLayout layout = new AbsoluteLayout(); + layout.setWidth("400px"); + layout.setHeight("400px"); + main.setContent(layout); + + final Button button = new Button ("This could be anywhere"); + layout.addComponent(button, "top: 100px; left: 50px;"); + } } |