blob: 68c977b84b756ee92d08d324449c4a52d5cc9ec9 (
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
48
49
|
package com.vaadin.tests.tickets;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
public class Ticket2037 extends com.vaadin.LegacyApplication {
@Override
public void init() {
LegacyWindow main = new LegacyWindow();
setMainWindow(main);
main.addComponent(new Label(
"Use debug dialog and trac number of registered paintables. It should not grow on subsequant b clicks."));
final Layout lo = new VerticalLayout();
Button b = new Button("b");
main.addComponent(b);
main.addComponent(lo);
b.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
repopupate(lo);
}
});
}
int counter = 0;
protected void repopupate(Layout lo) {
lo.removeAllComponents();
for (int i = 0; i < 20; i++) {
lo.addComponent(new Label("tc" + (counter++)));
}
}
}
|