summaryrefslogtreecommitdiffstats
path: root/src/com/itmill
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-11-02 14:08:34 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-11-02 14:08:34 +0000
commit7bd32e78af369312078f63681ad6d7cbc1ec1dac (patch)
tree468759bf8cc417e2de2da37dc2ffc36829d1f958 /src/com/itmill
parent7e4916e5dbebe205d485765ad1ff30bd77aa238d (diff)
downloadvaadin-framework-7bd32e78af369312078f63681ad6d7cbc1ec1dac.tar.gz
vaadin-framework-7bd32e78af369312078f63681ad6d7cbc1ec1dac.zip
Rollbacked back to original Hello World.. Please do not commit your tests over Hello World.. (In fact, you should use Janis Test Bench instead and save the tests for future use)
svn changeset:2693/svn branch:trunk
Diffstat (limited to 'src/com/itmill')
-rw-r--r--src/com/itmill/toolkit/demo/HelloWorld.java54
1 files changed, 10 insertions, 44 deletions
diff --git a/src/com/itmill/toolkit/demo/HelloWorld.java b/src/com/itmill/toolkit/demo/HelloWorld.java
index b6b40fcc11..d4ab04e486 100644
--- a/src/com/itmill/toolkit/demo/HelloWorld.java
+++ b/src/com/itmill/toolkit/demo/HelloWorld.java
@@ -1,12 +1,6 @@
package com.itmill.toolkit.demo;
-import com.itmill.toolkit.data.Property.ValueChangeEvent;
-import com.itmill.toolkit.data.Property.ValueChangeListener;
-import com.itmill.toolkit.ui.Label;
-import com.itmill.toolkit.ui.OrderedLayout;
-import com.itmill.toolkit.ui.Panel;
-import com.itmill.toolkit.ui.Slider;
-import com.itmill.toolkit.ui.Window;
+import com.itmill.toolkit.ui.*;
/**
* The classic "hello, world!" example for IT Mill Toolkit. The class simply
@@ -20,7 +14,6 @@ import com.itmill.toolkit.ui.Window;
*/
public class HelloWorld extends com.itmill.toolkit.Application {
- private Label value = new Label();
/**
* The initialization method that is the only requirement for inheriting the
* com.itmill.toolkit.service.Application class. It will be automatically
@@ -34,43 +27,16 @@ public class HelloWorld extends com.itmill.toolkit.Application {
*/
Window main = new Window("Hello window");
setMainWindow(main);
-
- OrderedLayout ol = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
- setTheme("example");
-
- Slider s = new Slider();
- s.setCaption("Volume");
- s.setMax(20);
- s.setMin(12);
- //s.setResolution(2);
- s.setImmediate(true);
- s.setOrientation(Slider.ORIENTATION_VERTICAL);
- //s.setArrows(true);
- s.setSize(200);
- //s.addStyleName(Slider.STYLE_SCROLLBAR);
-
- s.addListener(new ValueChangeListener() {
+ /*
+ * - Create a label with the classic text - Add the label to the main
+ * window
+ */
+ main.addComponent(new Label("Hello World!"));
- public void valueChange(ValueChangeEvent event) {
- value.setValue(event.getProperty().getValue());
- }
-
- });
-
- ol.addComponent(s);
-
- Panel p = new Panel("Volume level");
- p.setHeight(400);
- p.setHeightUnits(Panel.UNITS_PIXELS);
- ((OrderedLayout)p.getLayout()).setMargin(false,true,true,false);
-
- p.addComponent(value);
- ol.addComponent(p);
- value.setValue(s.getValue());
-
- ol.setComponentAlignment(s, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);
-
- main.setLayout(ol);
+ /*
+ * And that's it! The framework will display the main window and its
+ * contents when the application is accessed with the terminal.
+ */
}
}