diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-09-16 13:09:22 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-09-16 13:09:22 +0000 |
commit | 2d879dafea86fa45ce5c0d38d38bef20a4273df2 (patch) | |
tree | 5dcbc4d276443107cb46c8322da207b47cd94e2a /src/com | |
parent | fce223f35f93e6b8a549db43233aa0547539b86a (diff) | |
download | vaadin-framework-2d879dafea86fa45ce5c0d38d38bef20a4273df2.tar.gz vaadin-framework-2d879dafea86fa45ce5c0d38d38bef20a4273df2.zip |
added a test case
svn changeset:8816/svn branch:6.1
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/tests/components/form/FormNotGettingSmaller.java | 51 |
1 files changed, 51 insertions, 0 deletions
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; + } + +} |