diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-04-24 09:05:18 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-04-24 09:05:18 +0000 |
commit | b10f50ce72de52d1a48d10375277f435b2a83574 (patch) | |
tree | 715d8f253a1a10ee1883f21b3aebaed8e34861a0 | |
parent | 321befdac2ac230afeba0815d1848b10b5bc9828 (diff) | |
download | vaadin-framework-b10f50ce72de52d1a48d10375277f435b2a83574.tar.gz vaadin-framework-b10f50ce72de52d1a48d10375277f435b2a83574.zip |
fixed invalid test case: column width pixels define the area available for content
svn changeset:7524/svn branch:6.0
-rw-r--r-- | src/com/itmill/toolkit/tests/components/table/TableRowHeight2.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/tests/components/table/TableRowHeight2.java b/src/com/itmill/toolkit/tests/components/table/TableRowHeight2.java index f02a110bab..dc366e40fe 100644 --- a/src/com/itmill/toolkit/tests/components/table/TableRowHeight2.java +++ b/src/com/itmill/toolkit/tests/components/table/TableRowHeight2.java @@ -8,6 +8,9 @@ import com.itmill.toolkit.ui.Table; public class TableRowHeight2 extends TestBase { + private static final int TABLE_EXTRA = 2; // borders + private static final int COLEXTRASPACE = 6; // cell margins by theme + @Override protected String getDescription() { return "The table contains 2 rows, which both should be shown completely as the table height is undefined."; @@ -25,10 +28,16 @@ public class TableRowHeight2 extends TestBase { vl.setSizeFull(); Table table = new Table(); - table.setWidth("300px"); + + int COL_TITLE_W = 200; + int COL_TEST_W = 98; + + table + .setWidth((COL_TEST_W + COL_TITLE_W + 2 * COLEXTRASPACE + TABLE_EXTRA) + + "px"); table.setPageLength(0); - table.setColumnWidth("title", 200); - table.setColumnWidth("test", 98); + table.setColumnWidth("title", COL_TITLE_W); + table.setColumnWidth("test", COL_TEST_W); table.addContainerProperty("title", Button.class, ""); table.addContainerProperty("test", Button.class, ""); for (int i = 0; i < 2; i++) { |