blob: 7f7c8e30dfadf1e20db1dfa28b2524b0640ee4a0 (
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.vaadin.tests.components.absolutelayout;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Button;
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",
event -> vl.addComponent(testButton));
al.addComponent(testButton);
vl = new VerticalLayout();
al.addComponent(vl, "top: 100px");
addComponent(al);
Button b = new Button("Repaint inner layout",
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;
}
}
|