blob: b28eeaf88ffc1964a0e2cbd15bd0b03acb425c4d (
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
|
package com.vaadin.tests;
import com.vaadin.shared.ui.ContentMode;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
public class TestIFrames extends CustomComponent {
VerticalLayout main = new VerticalLayout();
public TestIFrames() {
setCompositionRoot(main);
createNewView();
}
public void createNewView() {
main.removeAllComponents();
main.addComponent(createEmbedded("http://demo.vaadin.com/sampler/"));
main.addComponent(createEmbedded("../colorpicker"));
// main.addComponent(createEmbedded("../TestForNativeWindowing"));
main.addComponent(createEmbedded("http://demo.vaadin.com/timeline"));
main.addComponent(createEmbedded("http://demo.vaadin.com/colorpicker"));
}
private Label createEmbedded(String URL) {
final int width = 600;
final int height = 250;
final String iFrame = "<iframe height=\"" + height + "\" width=\""
+ width + "\" src=\"" + URL + "\" />";
return new Label(iFrame, ContentMode.HTML);
}
}
|