From 1e154594c9ac7c71f988666e77c2447bc4048d5d Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 18 Jun 2009 05:47:12 +0000 Subject: Test case for undefined wide sub windows svn changeset:8212/svn branch:6.0 --- .../components/window/UndefinedWidthSubWindow.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java (limited to 'src') 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); + } + +} -- cgit v1.2.3