From: Artur Signell Date: Fri, 28 Aug 2009 13:07:34 +0000 (+0000) Subject: Test case for #3143 X-Git-Tag: 6.7.0.beta1~2578 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa902ac657d6f516c5a870b261202d88ebfdfa41;p=vaadin-framework.git Test case for #3143 svn changeset:8576/svn branch:6.1 --- diff --git a/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.java b/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.java new file mode 100644 index 0000000000..f0c3779a4e --- /dev/null +++ b/src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.java @@ -0,0 +1,45 @@ +package com.vaadin.tests.components.table; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.Label; +import com.vaadin.ui.Table; + +public class ColumnExpandWithFixedColumns extends TestBase { + + private Table createTable() { + Table t = new Table(); + t.addContainerProperty("id", Integer.class, null); + t.addContainerProperty("txt", Component.class, null); + t.addContainerProperty("button", Button.class, null); + t.setColumnWidth("id", 30); + t.setColumnWidth("button", 200); + t.setColumnExpandRatio("txt", 10);// This column should be 400px wide. + t.setSelectable(true); + t.setSizeFull(); + + for (int i = 0; i < 10; i++) { + t.addItem(new Object[] { i, new Label("test " + i), + new Button("Button " + i) }, i); + } + + return t; + + } + + @Override + protected String getDescription() { + return "The second coulmn has expand ratio and should use the maximum available space"; + } + + @Override + protected Integer getTicketNumber() { + return 3143; + } + + @Override + protected void setup() { + addComponent(createTable()); + } +}