diff options
author | Artur Signell <artur.signell@itmill.com> | 2008-09-01 13:28:53 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2008-09-01 13:28:53 +0000 |
commit | 5d372ed481b36e059a59eb6d7d7445617f68270c (patch) | |
tree | 0f7f00fe9920b32bed0fb4e2aa8be42303594a8f /src/com/itmill/toolkit/tests/tickets/Ticket2029.java | |
parent | 41687161d232289e5e07029efb19320d761a669b (diff) | |
download | vaadin-framework-5d372ed481b36e059a59eb6d7d7445617f68270c.tar.gz vaadin-framework-5d372ed481b36e059a59eb6d7d7445617f68270c.zip |
Testcase for #2029
svn changeset:5317/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/tests/tickets/Ticket2029.java')
-rw-r--r-- | src/com/itmill/toolkit/tests/tickets/Ticket2029.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2029.java b/src/com/itmill/toolkit/tests/tickets/Ticket2029.java new file mode 100644 index 0000000000..7ce7a42224 --- /dev/null +++ b/src/com/itmill/toolkit/tests/tickets/Ticket2029.java @@ -0,0 +1,49 @@ +package com.itmill.toolkit.tests.tickets;
+
+import java.util.Random;
+
+import com.itmill.toolkit.Application;
+import com.itmill.toolkit.terminal.UserError;
+import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.TextField;
+import com.itmill.toolkit.ui.Window;
+
+public class Ticket2029 extends Application {
+
+ Random r = new Random();
+
+ public void init() {
+ Window w = new Window(getClass().getSimpleName());
+ setMainWindow(w);
+ // setTheme("tests-tickets");
+ Panel p = new Panel("1000x150");
+ p.setWidth("1000");
+ p.setHeight("150");
+
+ OrderedLayout layout = new OrderedLayout(
+ OrderedLayout.ORIENTATION_HORIZONTAL);
+ p.setLayout(layout);
+ p.getLayout().setSizeFull();
+
+ w.getLayout().addComponent(p);
+
+ for (int i = 0; i < 10; i++) {
+ TextField tf = new TextField();
+ if (r.nextBoolean()) {
+ tf.setCaption("Caption");
+ }
+ if (r.nextBoolean()) {
+ tf.setRequired(true);
+ }
+ if (r.nextBoolean()) {
+ tf.setComponentError(new UserError("Error"));
+ }
+ tf.setWidth("100%");
+ layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT,
+ OrderedLayout.ALIGNMENT_BOTTOM);
+ p.addComponent(tf);
+
+ }
+ }
+}
|