diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-10-27 07:57:12 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-10-27 07:57:12 +0000 |
commit | 6a3c715dae922edd723c9423b4308d5d7948b74e (patch) | |
tree | 46a007274681a9803afccf135ace5554f3e01e3a /src/com/vaadin/tests/components/table/ModifyContainerProperty.java | |
parent | 931d75fef69deb9b738fad97001cf5621de9f43e (diff) | |
download | vaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.tar.gz vaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.zip |
Split demo and tests files to own source folders, for #3298
svn changeset:9390/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/tests/components/table/ModifyContainerProperty.java')
-rw-r--r-- | src/com/vaadin/tests/components/table/ModifyContainerProperty.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/com/vaadin/tests/components/table/ModifyContainerProperty.java b/src/com/vaadin/tests/components/table/ModifyContainerProperty.java deleted file mode 100644 index 0038e7f083..0000000000 --- a/src/com/vaadin/tests/components/table/ModifyContainerProperty.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.vaadin.tests.components.table;
-
-import com.vaadin.data.util.IndexedContainer;
-import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Table;
-
-@SuppressWarnings("serial")
-public class ModifyContainerProperty extends TestBase {
-
- private Table table = new Table();
- private IndexedContainer ic = new IndexedContainer();
-
- @Override
- protected void setup() {
- addComponent(table);
-
- ic.addContainerProperty("one", String.class, "one");
- ic.addContainerProperty("two", String.class, "two");
-
- ic.addItem("foo");
-
- ic.getContainerProperty("foo", "one").setValue("bar");
- ic.getContainerProperty("foo", "two").setValue("baz");
-
- table.setContainerDataSource(ic);
- addComponent(new Button("Remove container property",
- new Button.ClickListener() {
- public void buttonClick(com.vaadin.ui.Button.ClickEvent arg0) {
- ic.removeContainerProperty("one");
- }
- }));
- addComponent(new Button("Add container property",
- new Button.ClickListener() {
- public void buttonClick(com.vaadin.ui.Button.ClickEvent arg0) {
- ic.addContainerProperty("three", String.class, "three");
- Object[] current = table.getVisibleColumns();
- Object[] vis = new Object[current.length + 1];
- for (int i = 0; i < current.length; i++) {
- vis[i] = current[i];
- }
- vis[current.length] = "three";
- table.setVisibleColumns(vis);
- }
- }));
- }
-
- @Override
- protected String getDescription() {
- return "Clicking on \"Add container property\" adds a property to the container and sets it visible. The table should then show a \"three\" column in addition to the others. Clicking on \"Remove container property\" should remove column \"two\" from the table.";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 3165;
- }
-}
|