From fa902ac657d6f516c5a870b261202d88ebfdfa41 Mon Sep 17 00:00:00 2001
From: Artur Signell <artur.signell@itmill.com>
Date: Fri, 28 Aug 2009 13:07:34 +0000
Subject: Test case for #3143

svn changeset:8576/svn branch:6.1
---
 .../table/ColumnExpandWithFixedColumns.java        | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 src/com/vaadin/tests/components/table/ColumnExpandWithFixedColumns.java

(limited to 'src/com')

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());
+    }
+}
-- 
cgit v1.2.3