blob: 579590ed78a02a95630fcb8e072534e35063e249 (
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
|
package com.vaadin.tests.components.window;
import com.vaadin.server.ThemeResource;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
public class EmbeddedInSubWindow extends TestBase {
@Override
protected String getDescription() {
return "The sub window contains a large icon and should be sized according to the icon. The icon contains a blue border of 10px at the outer edges. The layout in the sub window has margins enabled.";
}
@Override
protected Integer getTicketNumber() {
return null;
}
@Override
protected void setup() {
setTheme("tests-tickets");
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSizeUndefined();
Window zoom = new Window("Image Preview", layout);
zoom.setSizeUndefined();
String res = "icons/EmbeddedInSubWindow-image.png";
Embedded imagePreview = new Embedded(null, new ThemeResource(res));
imagePreview.setSizeUndefined();
layout.addComponent(imagePreview);
zoom.setModal(true);
zoom.setResizable(false);
getMainWindow().addWindow(zoom);
}
}
|