blob: c09fd07837eb1d6d0a9cdb331bb88fcd5671c540 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
package com.vaadin.tests.tickets;
import com.vaadin.Application;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.TestForTablesInitialColumnWidthLogicRendering;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.VerticalSplitPanel;
/**
* With IE7 extra scrollbars appear in content area all though content fits
* properly. Scrollbars will disappear if "shaking" content a bit, like
* selecting tests in area.
*/
public class Ticket1225 extends Application {
@Override
public void init() {
final LegacyWindow mainWin = new LegacyWindow(
"Test app to break layout fuction in IE7");
setMainWindow(mainWin);
VerticalSplitPanel sp = new VerticalSplitPanel();
sp.setFirstComponent(new Label("First"));
VerticalLayout el = new VerticalLayout();
sp.setSecondComponent(el);
el.setMargin(true);
el.setSizeFull();
el.addComponent(new Label("Top"));
Table testTable = TestForTablesInitialColumnWidthLogicRendering
.getTestTable(5, 50);
testTable.setSizeFull();
TabSheet ts = new TabSheet();
ts.setSizeFull();
Label red = new Label(
"<div style='background:red;width:100%;height:100%;'>??</div>",
ContentMode.XHTML);
// red.setCaption("cap");
// red.setSizeFull();
// el.addComponent(testTable);
// el.setExpandRatio(testTable,1);
el.addComponent(ts);
el.setExpandRatio(ts, 1);
ts.addComponent(red);
ts.getTab(red).setCaption("REd tab");
Label l = new Label("<div style='background:blue;'>sdf</div>",
ContentMode.XHTML);
el.addComponent(l);
el.setComponentAlignment(l, Alignment.MIDDLE_RIGHT);
mainWin.setContent(sp);
}
}
|