blob: d8375be9a5a8cafdbc01ceffe13f77e56eaf4965 (
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
|
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;
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();
}
});
}
};
|