summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-09-08 06:00:57 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-09-08 06:00:57 +0000
commitc4fafbe881d8802257a9673f797965d64fc6b131 (patch)
tree7fec6dc7d8b618a294f99b06bb2adbcd492fa898
parent00b6da08af232cfa3cfa5e569561cdbf0cbabaf3 (diff)
downloadvaadin-framework-c4fafbe881d8802257a9673f797965d64fc6b131.tar.gz
vaadin-framework-c4fafbe881d8802257a9673f797965d64fc6b131.zip
reverted accidentally committed test
svn changeset:8691/svn branch:6.1
-rw-r--r--src/com/vaadin/demo/HelloWorld.java44
1 files changed, 10 insertions, 34 deletions
diff --git a/src/com/vaadin/demo/HelloWorld.java b/src/com/vaadin/demo/HelloWorld.java
index 9aed77adef..4a1042709d 100644
--- a/src/com/vaadin/demo/HelloWorld.java
+++ b/src/com/vaadin/demo/HelloWorld.java
@@ -1,47 +1,23 @@
package com.vaadin.demo;
-import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
-import com.vaadin.ui.TabSheet;
-import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.TabSheet.Tab;
@SuppressWarnings("serial")
-public class HelloWorld extends com.vaadin.Application implements ClickListener {
- private static final int TABS_COUNT = 3;
- private TabSheet tabSheet;
- private Label[] label = new Label[TABS_COUNT];
- private Tab[] tab = new Tab[TABS_COUNT];
+public class HelloWorld extends com.vaadin.Application {
+ /**
+ * Init is invoked on application load (when a user accesses the application
+ * for the first time).
+ */
@Override
public void init() {
- setMainWindow(new Window("TabSheet Demo", createMainLayout()));
- }
-
- private VerticalLayout createMainLayout() {
- VerticalLayout layout = new VerticalLayout();
- tabSheet = new TabSheet();
- for (int i = 1; i <= TABS_COUNT; i++) {
- label[i - 1] = new Label("Tab " + i);
- tab[i - 1] = tabSheet.addTab(label[i - 1], "Tab " + i, null);
- tab[i - 1].setEnabled(false);
- }
-
- layout.addComponent(tabSheet);
- Button btn = new Button("Enable and activate tab");
- btn.addListener(this);
- layout.addComponent(btn);
- return layout;
- }
+ // Main window is the primary browser window
+ final Window main = new Window("Hello window");
+ setMainWindow(main);
- public void buttonClick(ClickEvent event) {
- for (int i = 0; i < TABS_COUNT; i++) {
- tab[i].setEnabled(true);
- }
- tabSheet.setSelectedTab(label[0]);
+ // "Hello world" text is added to window as a Label component
+ main.addComponent(new Label("Hello World!"));
}
}