blob: fb1c5440ad7f215ec0aefe3db67a116741337f9d (
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
|
package com.vaadin.tests.tickets;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import com.vaadin.Application;
import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
public class Ticket2303 extends Application.LegacyApplication {
@Override
public void init() {
LegacyWindow w = new LegacyWindow("main window");
String customlayout = "<div location=\"test\"></div>";
CustomLayout cl = null;
try {
cl = new CustomLayout(new ByteArrayInputStream(
customlayout.getBytes()));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
cl.setWidth("100%");
w.setContent(cl);
// VerticalLayout ol = new VerticalLayout();
// w.setContent(ol);
VerticalLayout hugeLayout = new VerticalLayout();
hugeLayout.setMargin(true);
hugeLayout.setSpacing(true);
for (int i = 0; i < 30; i++) {
hugeLayout.addComponent(new Label("huge " + i));
}
cl.addComponent(hugeLayout, "test");
// ol.addComponent(hugeLayout);
setMainWindow(w);
}
}
|