blob: a88de358d51a2bb47f3b0ee292e9449aa690f02d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package ch.asynk.helloworld;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
public 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();
}
});
}
};
|