summaryrefslogtreecommitdiffstats
path: root/vaadin-app/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-09-26 15:26:42 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-09-26 15:26:42 +0200
commit8aa1929613aae88b2669cd764bad3e2400290f96 (patch)
tree8721c55add3070dee4e516bd627de02a33321bc3 /vaadin-app/src/ch
parent68daa4fa00300af31778e079b79ea825c12ac3be (diff)
downloadskeletons-8aa1929613aae88b2669cd764bad3e2400290f96.zip
skeletons-8aa1929613aae88b2669cd764bad3e2400290f96.tar.gz
vaadin-app: add EndLayout
Diffstat (limited to 'vaadin-app/src/ch')
-rw-r--r--vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java30
1 files changed, 25 insertions, 5 deletions
diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
index ec7ac94..19f9fbd 100644
--- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
+++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
@@ -25,6 +25,26 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.TextField;
import com.vaadin.ui.AbstractComponent;
+class EndLayout extends VerticalLayout {
+
+ public EndLayout() {
+ //
+ final Label lb1 = new Label();
+ lb1.setCaption("That's all folks");
+ addComponent(lb1);
+ //
+ Button closeButton = new Button("close the application");
+ closeButton.setDescription("This will close the application");
+ addComponent(closeButton );
+ closeButton.addListener( new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ getApplication().getMainWindow().getApplication().close();
+ }
+ });
+ }
+};
+
class DataMappingLayout extends FormLayout {
public DataMappingLayout() {
@@ -140,13 +160,13 @@ class DataMappingLayout extends FormLayout {
});
addComponent(tf4);
//
- Button closeButton = new Button("close the application");
- closeButton.setDescription("This will close the application");
- addComponent(closeButton );
- closeButton.addListener( new Button.ClickListener() {
+ Button nextButton = new Button("end layout");
+ nextButton.setDescription("Go to end layout");
+ addComponent(nextButton );
+ nextButton.addListener( new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- getApplication().getMainWindow().getApplication().close();
+ getApplication().getMainWindow().setContent( new EndLayout() );
}
});
}