summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-04-06 15:31:05 +0000
committerArtur Signell <artur.signell@itmill.com>2010-04-06 15:31:05 +0000
commit05a17f6ed335d1a25dbea72786b4bc3de25c6108 (patch)
treeeb0cfe7e23a0f2e337f86add4b667b4ef66ee7e3 /tests
parente38e4802ff388ac80e9d738d964e6e27aaaf918e (diff)
downloadvaadin-framework-05a17f6ed335d1a25dbea72786b4bc3de25c6108.tar.gz
vaadin-framework-05a17f6ed335d1a25dbea72786b4bc3de25c6108.zip
Test case for #4489
svn changeset:12332/svn branch:6.3
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/vaadin/tests/components/table/TableExtraScrollbars.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/table/TableExtraScrollbars.java b/tests/src/com/vaadin/tests/components/table/TableExtraScrollbars.java
new file mode 100644
index 0000000000..ca50f16835
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/table/TableExtraScrollbars.java
@@ -0,0 +1,51 @@
+package com.vaadin.tests.components.table;
+
+import com.vaadin.Application;
+import com.vaadin.data.Container;
+import com.vaadin.data.Item;
+import com.vaadin.data.util.IndexedContainer;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+
+public class TableExtraScrollbars extends Application {
+
+ private static int PROPS = 15;
+ private static int ROWS = 1000;
+
+ @Override
+ public void init() {
+ setTheme("runo");
+ Window w = new Window("Table scrollbars bug example");
+ setMainWindow(w);
+
+ VerticalLayout vl = new VerticalLayout();
+ vl.setSizeFull();
+ vl.addComponent(createTable());
+ w.setContent(vl);
+ }
+
+ protected Table createTable() {
+ Table table = new Table(null, createContainer());
+ table.setSizeFull();
+ table.setPageLength(50);
+ table.setColumnReorderingAllowed(true);
+ table.setSelectable(true);
+ return table;
+ }
+
+ protected Container createContainer() {
+ Container container = new IndexedContainer();
+ for (int i = 0; i < PROPS; ++i) {
+ container.addContainerProperty("prop" + i, String.class, null);
+ }
+ for (int i = 0; i < ROWS; ++i) {
+ Item item = container.addItem(i);
+ for (int p = 0; p < PROPS; ++p) {
+ item.getItemProperty("prop" + p).setValue(
+ "property value 1234567890");
+ }
+ }
+ return container;
+ }
+} \ No newline at end of file