summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-06-18 05:47:12 +0000
committerArtur Signell <artur.signell@itmill.com>2009-06-18 05:47:12 +0000
commit1e154594c9ac7c71f988666e77c2447bc4048d5d (patch)
treea0c0300f83f3ad00de9e4ed69002ef786a62ab16
parent2d1aba041d90e8c892153eff64c519be2f215a7d (diff)
downloadvaadin-framework-1e154594c9ac7c71f988666e77c2447bc4048d5d.tar.gz
vaadin-framework-1e154594c9ac7c71f988666e77c2447bc4048d5d.zip
Test case for undefined wide sub windows
svn changeset:8212/svn branch:6.0
-rw-r--r--src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java
new file mode 100644
index 0000000000..f29178a525
--- /dev/null
+++ b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java
@@ -0,0 +1,44 @@
+package com.vaadin.tests.components.window;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.Window;
+
+public class UndefinedWidthSubWindow extends TestBase {
+
+ @Override
+ protected String getDescription() {
+ return "Two windows should be shown. The width of the one in the upper left corner should be adjusted according to the contents. The centered windows width should be set according to the caption and the second textfield should be clipped.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return null;
+ }
+
+ @Override
+ protected void setup() {
+ Window dialog = new Window("Dialog - width defined by contents",
+ new HorizontalLayout());
+ dialog.getContent().setSizeUndefined();
+ dialog.addComponent(new TextField("Field 1"));
+ dialog.addComponent(new TextField("Field 2"));
+ dialog.addComponent(new Button("Ok"));
+
+ getMainWindow().addWindow(dialog);
+
+ Window dialog2 = new Window("Dialog - width defined by caption");
+ dialog2.addComponent(new TextField("Field 1"));
+
+ TextField tf2 = new TextField("Field 2");
+ tf2.setWidth("500px");
+ dialog2.addComponent(tf2);
+ dialog2.addComponent(new Button("Ok"));
+
+ dialog2.center();
+ getMainWindow().addWindow(dialog2);
+ }
+
+}