blob: b4a3d02efa313be9d285f74306ad00cdbb9f606f (
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
|
package com.vaadin.tests.tickets;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URL;
import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
public class Ticket2297 extends Ticket2292 {
@Override
public void init() {
final LegacyWindow main = new LegacyWindow(getClass().getName()
.substring(getClass().getName().lastIndexOf(".") + 1));
setMainWindow(main);
URL url = getURL();
main.addComponent(new Label(
"Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));
try {
CustomLayout cl = new CustomLayout(
new ByteArrayInputStream(
("This is an empty CustomLayout with as slow image. <img src=\""
+ url.toString() + "/icon.png\" />")
.getBytes()));
main.addComponent(cl);
cl = new CustomLayout(
new ByteArrayInputStream(
("This is an empty CustomLayout with as slow image. <img src=\""
+ url.toString() + "/icon.png\" />")
.getBytes()));
main.addComponent(cl);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|