blob: 2b5c15f99c4e6ef1d83514e56a49df63ce05d39d (
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
27
28
29
30
31
|
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 {
//
private static final long serialVersionUID = 1L;
//
private Context ctx = null;
public EndLayout(Context context) {
ctx = context;
//
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();
}
});
}
};
|