Test case for #1225

svn changeset:3932/svn branch:trunk
This commit is contained in:
Matti Tahvonen 2008-02-27 06:43:29 +00:00
parent 9e5b1f5171
commit c02aa8e841

View File

@ -0,0 +1,67 @@
package com.itmill.toolkit.tests.tickets;
import com.itmill.toolkit.Application;
import com.itmill.toolkit.tests.TestForTablesInitialColumnWidthLogicRendering;
import com.itmill.toolkit.ui.ExpandLayout;
import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.SplitPanel;
import com.itmill.toolkit.ui.TabSheet;
import com.itmill.toolkit.ui.Table;
import com.itmill.toolkit.ui.Window;
/**
* 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 {
public void init() {
final Window mainWin = new Window(
"Test app to break layout fuction in IE7");
setMainWindow(mainWin);
SplitPanel sp = new SplitPanel();
sp.setFirstComponent(new Label("First"));
ExpandLayout el = new ExpandLayout();
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>",
Label.CONTENT_XHTML);
// red.setCaption("cap");
// red.setSizeFull();
// el.addComponent(testTable);
// el.expand(testTable);
el.addComponent(ts);
el.expand(ts);
ts.addComponent(red);
ts.setTabCaption(red, "REd tab");
Label l = new Label("<div style='background:blue;'>sdf</div>",
Label.CONTENT_XHTML);
el.addComponent(l);
el.setComponentAlignment(l, ExpandLayout.ALIGNMENT_RIGHT,
ExpandLayout.ALIGNMENT_VERTICAL_CENTER);
mainWin.setLayout(sp);
}
}