aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/tests/TableSelectTest.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
committerMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
commitf2e3722df9676436680afc0f1991e91e1696fb99 (patch)
tree6f255ff78abaf96f1e71a1f2c9ecd3b66647f4a2 /src/com/itmill/toolkit/tests/TableSelectTest.java
parent93291f532db9d545cf2a8dd98e2671f27cd197b0 (diff)
downloadvaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.tar.gz
vaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.zip
MASS REFORMAT.
According to http://toolkit.intra.itmill.com/trac/itmilltoolkit/wiki/CodingConventions svn changeset:2864/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/tests/TableSelectTest.java')
-rw-r--r--src/com/itmill/toolkit/tests/TableSelectTest.java216
1 files changed, 108 insertions, 108 deletions
diff --git a/src/com/itmill/toolkit/tests/TableSelectTest.java b/src/com/itmill/toolkit/tests/TableSelectTest.java
index c00b2bdce8..eb53f5cbf1 100644
--- a/src/com/itmill/toolkit/tests/TableSelectTest.java
+++ b/src/com/itmill/toolkit/tests/TableSelectTest.java
@@ -7,113 +7,113 @@ import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.Table;
public class TableSelectTest extends CustomComponent implements
- Table.ValueChangeListener {
-
- public TableSelectTest() {
- OrderedLayout main = new OrderedLayout();
- setCompositionRoot(main);
- main.addComponent(new Label("Hello World!"));
-
- Table t;
- t = new Table("single nullsel");
- main.addComponent(t);
- t(t);
- t.setMultiSelect(false);
- t.setNullSelectionAllowed(true);
- t.addListener(this);
-
- t = new Table("single NO-nullsel");
- main.addComponent(t);
- t(t);
- t.setMultiSelect(false);
- t.setNullSelectionAllowed(false);
- t.addListener(this);
-
- t = new Table("multi nullsel");
- main.addComponent(t);
- t(t);
- t.setMultiSelect(true);
- t.setNullSelectionAllowed(true);
- t.addListener(this);
-
- t = new Table("multi NO-nullsel");
- main.addComponent(t);
- t(t);
- t.setMultiSelect(true);
- t.setNullSelectionAllowed(false);
- t.addListener(this);
-
- // --
-
- t = new Table("single nullsel nullselid");
- main.addComponent(t);
- Object id = t(t);
- t.setNullSelectionItemId(id);
- t.setMultiSelect(false);
- t.setNullSelectionAllowed(true);
- t.addListener(this);
-
- t = new Table("single NO-nullsel nullselid");
- main.addComponent(t);
- id = t(t);
- t.setNullSelectionItemId(id);
- t.setMultiSelect(false);
- t.setNullSelectionAllowed(false);
- t.addListener(this);
-
- t = new Table("multi(fails) nullsel nullselid");
- main.addComponent(t);
- id = t(t);
- t.setNullSelectionItemId(id);
- try {
- t.setMultiSelect(true);
- t.setCaption("multi(SHOLD FAIL BUT DID NOT) nullsel nullselid");
- } catch (Exception e) {
- System.err.println("failed ok");
- }
- t.setNullSelectionAllowed(true);
- t.addListener(this);
-
- t = new Table("multi(fails) NO-nullsel nullselid");
- main.addComponent(t);
- id = t(t);
- t.setNullSelectionItemId(id);
- try {
- t.setMultiSelect(true);
- t.setCaption("multi(SHOLD FAIL BUT DID NOT) NO-nullsel nullselid");
- } catch (Exception e) {
- System.err.println("failed ok");
- }
- t.setNullSelectionAllowed(false);
- t.addListener(this);
-
- /*
- * And that's it! The framework will display the main window and its
- * contents when the application is accessed with the terminal.
- */
-
- }
-
- private Object t(Table t) {
- t.setImmediate(true);
- t.setSelectable(true);
-
- Object id = null;
- for (int i = 0; i < 5; i++) {
- id = t.addItem();
- }
- t.addContainerProperty("asd", String.class, "the asd thing");
- t.addContainerProperty("foo", String.class, "foo stuff");
- t.addContainerProperty("Alonger column header", String.class, "short");
-
- return id;
- }
-
- public void valueChange(ValueChangeEvent event) {
- Object val = event.getProperty().getValue();
-
- System.err.println("Value: " + val);
-
- }
+ Table.ValueChangeListener {
+
+ public TableSelectTest() {
+ OrderedLayout main = new OrderedLayout();
+ setCompositionRoot(main);
+ main.addComponent(new Label("Hello World!"));
+
+ Table t;
+ t = new Table("single nullsel");
+ main.addComponent(t);
+ t(t);
+ t.setMultiSelect(false);
+ t.setNullSelectionAllowed(true);
+ t.addListener(this);
+
+ t = new Table("single NO-nullsel");
+ main.addComponent(t);
+ t(t);
+ t.setMultiSelect(false);
+ t.setNullSelectionAllowed(false);
+ t.addListener(this);
+
+ t = new Table("multi nullsel");
+ main.addComponent(t);
+ t(t);
+ t.setMultiSelect(true);
+ t.setNullSelectionAllowed(true);
+ t.addListener(this);
+
+ t = new Table("multi NO-nullsel");
+ main.addComponent(t);
+ t(t);
+ t.setMultiSelect(true);
+ t.setNullSelectionAllowed(false);
+ t.addListener(this);
+
+ // --
+
+ t = new Table("single nullsel nullselid");
+ main.addComponent(t);
+ Object id = t(t);
+ t.setNullSelectionItemId(id);
+ t.setMultiSelect(false);
+ t.setNullSelectionAllowed(true);
+ t.addListener(this);
+
+ t = new Table("single NO-nullsel nullselid");
+ main.addComponent(t);
+ id = t(t);
+ t.setNullSelectionItemId(id);
+ t.setMultiSelect(false);
+ t.setNullSelectionAllowed(false);
+ t.addListener(this);
+
+ t = new Table("multi(fails) nullsel nullselid");
+ main.addComponent(t);
+ id = t(t);
+ t.setNullSelectionItemId(id);
+ try {
+ t.setMultiSelect(true);
+ t.setCaption("multi(SHOLD FAIL BUT DID NOT) nullsel nullselid");
+ } catch (Exception e) {
+ System.err.println("failed ok");
+ }
+ t.setNullSelectionAllowed(true);
+ t.addListener(this);
+
+ t = new Table("multi(fails) NO-nullsel nullselid");
+ main.addComponent(t);
+ id = t(t);
+ t.setNullSelectionItemId(id);
+ try {
+ t.setMultiSelect(true);
+ t.setCaption("multi(SHOLD FAIL BUT DID NOT) NO-nullsel nullselid");
+ } catch (Exception e) {
+ System.err.println("failed ok");
+ }
+ t.setNullSelectionAllowed(false);
+ t.addListener(this);
+
+ /*
+ * And that's it! The framework will display the main window and its
+ * contents when the application is accessed with the terminal.
+ */
+
+ }
+
+ private Object t(Table t) {
+ t.setImmediate(true);
+ t.setSelectable(true);
+
+ Object id = null;
+ for (int i = 0; i < 5; i++) {
+ id = t.addItem();
+ }
+ t.addContainerProperty("asd", String.class, "the asd thing");
+ t.addContainerProperty("foo", String.class, "foo stuff");
+ t.addContainerProperty("Alonger column header", String.class, "short");
+
+ return id;
+ }
+
+ public void valueChange(ValueChangeEvent event) {
+ Object val = event.getProperty().getValue();
+
+ System.err.println("Value: " + val);
+
+ }
}