blob: c14cda58f14ae6fcb7842141c2336bc00dcec014 (
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
50
51
52
53
54
55
56
57
58
59
60
|
package com.vaadin.tests.components.absolutelayout;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.VerticalLayout;
public class MoveComponentsFromAbsoluteLayoutToInnerLayout extends TestBase {
protected Button testButton;
private AbsoluteLayout al;
protected ComponentContainer vl;
@Override
protected void setup() {
al = new AbsoluteLayout();
al.setWidth("200px");
al.setHeight("200px");
testButton = new Button("Click to move to inner layout",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
vl.addComponent(testButton);
}
});
al.addComponent(testButton);
vl = new VerticalLayout();
al.addComponent(vl, "top: 100px");
addComponent(al);
Button b = new Button("Repaint inner layout",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
vl.markAsDirty();
}
});
addComponent(b);
}
@Override
protected String getDescription() {
return "Click the first button to move it from an outer layout to an inner. Then click the second button to repaint the inner layout.";
}
@Override
protected Integer getTicketNumber() {
return 6061;
}
}
|