blob: 4f33b59a1b760994be65eff6fe027da38f952873 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
package com.itmill.toolkit.tests.tickets;
import com.itmill.toolkit.Application;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.VerticalLayout;
import com.itmill.toolkit.ui.Window;
import com.itmill.toolkit.ui.Button.ClickEvent;
import com.itmill.toolkit.ui.Button.ClickListener;
public class Ticket2406 extends Application {
private Window w;
public void init() {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((VerticalLayout) w.getLayout());
}
private void createUI(VerticalLayout layout) {
w = new Window("A sub window");
w.setSizeUndefined();
getMainWindow().addWindow(w);
VerticalLayout l = new VerticalLayout();
l.setSizeFull();
w.setLayout(l);
Button b = new Button("Button 1");
b.setSizeFull();
b.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
w.setHeight("200px");
}
});
l.addComponent(b);
for (int i = 0; i < 5; i++) {
b = new Button("Button number "+(i+2));
b.setSizeFull();
l.addComponent(b);
}
}
}
|