blob: 38f2445581b87c5d93ec62c8c2eaec96fc980d8a (
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
|
package com.itmill.toolkit.tests;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.DateField;
import com.itmill.toolkit.ui.ExpandLayout;
import com.itmill.toolkit.ui.Label;
/**
*
* @author IT Mill Ltd.
*/
public class TestForExpandLayout extends CustomComponent {
ExpandLayout main = new ExpandLayout();
DateField df;
public TestForExpandLayout() {
setCompositionRoot(main);
createNewView();
}
public void createNewView() {
main.removeAllComponents();
for (int i = 0; i < 10; i++) {
ExpandLayout el = new ExpandLayout(
ExpandLayout.ORIENTATION_HORIZONTAL);
for (int j = 0; j < 10; j++) {
Label l = new Label("label" + i + ":" + j);
el.addComponent(l);
}
if (i > 0) {
el.setHeight(1);
el.setHeightUnits(ExpandLayout.UNITS_EM);
}
main.addComponent(el);
}
}
}
|