summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarko Grönroos <magi@iki.fi>2009-05-27 12:30:44 +0000
committerMarko Grönroos <magi@iki.fi>2009-05-27 12:30:44 +0000
commit284b7337bce99eb25de02972283e2b16e971b32d (patch)
tree6ad555661edfefc9f29edb9a67f11d0074684ba5 /src
parentadb42ba3dcbfc01d0abe5bbffe69cb129ceca979 (diff)
downloadvaadin-framework-284b7337bce99eb25de02972283e2b16e971b32d.tar.gz
vaadin-framework-284b7337bce99eb25de02972283e2b16e971b32d.zip
TabSheet example in Book examples.
svn changeset:8031/svn branch:6.0
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/tests/book/BookTestApplication.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/vaadin/tests/book/BookTestApplication.java b/src/com/vaadin/tests/book/BookTestApplication.java
index e0a6309f79..9d116edbcd 100644
--- a/src/com/vaadin/tests/book/BookTestApplication.java
+++ b/src/com/vaadin/tests/book/BookTestApplication.java
@@ -1022,7 +1022,22 @@ public class BookTestApplication extends com.vaadin.Application {
}
void example_TabSheet(Window main, String param) {
- if (param.equals("icon")) {
+ if (param.equals("simple")) {
+ // Create an empty tab sheet.
+ TabSheet tabsheet = new TabSheet();
+
+ // Create a component to put in a tab and put
+ // some content in it.
+ VerticalLayout myTab = new VerticalLayout();
+ myTab.addComponent(new Label("Hello, I am a Tab!"));
+
+ // Add the component to the tab sheet as a new tab.
+ tabsheet.addTab(myTab);
+
+ // Get the Tab holding the component and set its caption.
+ tabsheet.getTab(myTab).setCaption("My Tab");
+
+ } else if (param.equals("icon")) {
final TabSheet tabsheet = new TabSheet();
tabsheet.addTab(new Label("Contents of the first tab"),