blob: 6719820c44e91fbdff5e1a8fe1f561ea833d7662 (
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
|
/*
@ITMillApache2LicenseForJavaFiles@
*/
package com.vaadin.tests;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.OrderedLayout;
public class TestIFrames extends CustomComponent {
OrderedLayout main = new OrderedLayout();
public TestIFrames() {
setCompositionRoot(main);
createNewView();
}
public void createNewView() {
main.removeAllComponents();
main.addComponent(createEmbedded("../Reservr/"));
main.addComponent(createEmbedded("../colorpicker"));
// main.addComponent(createEmbedded("../TestForNativeWindowing"));
main
.addComponent(createEmbedded("http://toolkit.itmill.com/demo/FeaturesApplication"));
main
.addComponent(createEmbedded("http://toolkit.itmill.com/demo/TableDemo"));
}
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, Label.CONTENT_XHTML);
}
}
|