From: Matti Tahvonen Date: Wed, 16 Sep 2009 13:09:22 +0000 (+0000) Subject: added a test case X-Git-Tag: 6.7.0.beta1~2479^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d879dafea86fa45ce5c0d38d38bef20a4273df2;p=vaadin-framework.git added a test case svn changeset:8816/svn branch:6.1 --- diff --git a/src/com/vaadin/tests/components/form/FormNotGettingSmaller.java b/src/com/vaadin/tests/components/form/FormNotGettingSmaller.java new file mode 100644 index 0000000000..5cf048a2f3 --- /dev/null +++ b/src/com/vaadin/tests/components/form/FormNotGettingSmaller.java @@ -0,0 +1,51 @@ +package com.vaadin.tests.components.form; + +import com.vaadin.data.Item; +import com.vaadin.data.util.ObjectProperty; +import com.vaadin.data.util.PropertysetItem; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Form; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; + +public class FormNotGettingSmaller extends TestBase { + + @Override + protected void setup() { + Item item = new PropertysetItem(); + item.addItemProperty("name", new ObjectProperty("Charles Anthony")); + item.addItemProperty("city", new ObjectProperty("London")); + item.addItemProperty("isTallPerson", new ObjectProperty(Boolean.FALSE)); + + Label spacer = new Label(); + HorizontalLayout buttons = new HorizontalLayout(); + buttons.setSpacing(true); + buttons.setWidth("100%"); + buttons.addComponent(spacer); + buttons.addComponent(new Button("OK")); + buttons.addComponent(new Button("Cancel")); + buttons.setExpandRatio(spacer, 1f); + + Form form = new Form(); + form + .setDescription("Ooh. Just a demonstration of things, really. Some long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet."); + + form.setItemDataSource(item); + form.setFooter(buttons); + + getLayout().addComponent(form); + } + + @Override + protected String getDescription() { + return "When resizing window buttons should stay on " + + "right edge of the screent. Form should also get narrower."; + } + + @Override + protected Integer getTicketNumber() { + return null; + } + +}