summaryrefslogtreecommitdiffstats
path: root/vaadin-app/src/ch
diff options
context:
space:
mode:
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() );
}
});
}