diff options
author | John Alhroos <john.ahlroos@itmill.com> | 2010-04-15 07:22:16 +0000 |
---|---|---|
committer | John Alhroos <john.ahlroos@itmill.com> | 2010-04-15 07:22:16 +0000 |
commit | 0d6c751c7310af9262271fad563506f115c1c156 (patch) | |
tree | ce763889019aa5fbe4567903c2f25d367a71f41e /tests/src/com/vaadin | |
parent | bc3e6b2a96f527f2b7ee6a4dcfd381f7ad51cd03 (diff) | |
download | vaadin-framework-0d6c751c7310af9262271fad563506f115c1c156.tar.gz vaadin-framework-0d6c751c7310af9262271fad563506f115c1c156.zip |
Test application for #3520
svn changeset:12532/svn branch:6.4
Diffstat (limited to 'tests/src/com/vaadin')
-rw-r--r-- | tests/src/com/vaadin/tests/components/table/CtrlShiftMultiselect.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/table/CtrlShiftMultiselect.java b/tests/src/com/vaadin/tests/components/table/CtrlShiftMultiselect.java new file mode 100644 index 0000000000..02f4af045b --- /dev/null +++ b/tests/src/com/vaadin/tests/components/table/CtrlShiftMultiselect.java @@ -0,0 +1,53 @@ +package com.vaadin.tests.components.table; + +import com.vaadin.data.Container; +import com.vaadin.data.Item; +import com.vaadin.data.util.IndexedContainer; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Table; + +@SuppressWarnings("serial") +public class CtrlShiftMultiselect extends TestBase { + + @Override + protected void setup() { + final Table table = new Table("Multiselectable table"); + + table.setContainerDataSource(createContainer()); + table.setImmediate(true); + + table.setSelectable(true); + table.setMultiSelect(true); + + table.setWidth("400px"); + table.setHeight("400px"); + + addComponent(table); + } + + @Override + protected String getDescription() { + return "Improve Table multiselect to use Ctrl and Shift for selection"; + } + + @Override + protected Integer getTicketNumber() { + return 3520; + } + + private Container createContainer() { + IndexedContainer container = new IndexedContainer(); + container.addContainerProperty("col1", String.class, ""); + container.addContainerProperty("col2", String.class, ""); + container.addContainerProperty("col3", String.class, ""); + + for (int i = 0; i < 100; i++) { + Item item = container.addItem("item " + i); + item.getItemProperty("col1").setValue("first" + i); + item.getItemProperty("col2").setValue("middle" + i); + item.getItemProperty("col3").setValue("last" + i); + } + + return container; + } +} |