From 08cc349e8b4e81f5f5f3c037417d32d661bd09d7 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Wed, 28 Oct 2009 10:11:27 +0000 Subject: merged [9424] (partly by hand because of source folder refactoring) from 6.1 svn changeset:9425/svn branch:6.2 --- .../form/FormWithRelativelySizedLayout.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/form/FormWithRelativelySizedLayout.java (limited to 'tests') diff --git a/tests/src/com/vaadin/tests/components/form/FormWithRelativelySizedLayout.java b/tests/src/com/vaadin/tests/components/form/FormWithRelativelySizedLayout.java new file mode 100644 index 0000000000..17fe4477c3 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/form/FormWithRelativelySizedLayout.java @@ -0,0 +1,52 @@ +package com.vaadin.tests.components.form; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.CssLayout; +import com.vaadin.ui.Form; +import com.vaadin.ui.Label; + +public class FormWithRelativelySizedLayout extends TestBase { + + @Override + protected String getDescription() { + return "Forms mainlayouts relative height should be everyting left out from footer and possible borders/paddings. "; + } + + @Override + protected Integer getTicketNumber() { + return 3488; + } + + @Override + protected void setup() { + + Form f = new Form(); + f.setCaption("Form, full size"); + + f.setWidth("100%"); + f.setHeight("100%"); + + Label l = new Label( + "This green label should consume all available space, pushing ok button to bottom of the view"); + l.setSizeFull(); + + CssLayout lo = new CssLayout() { + @Override + protected String getCss(Component c) { + return "background: green;color:red;"; + } + }; + lo.setSizeFull(); + + f.setLayout(lo); + lo.addComponent(l); + + f.getFooter().addComponent(new Button("OK button")); + + getLayout().setSizeFull(); + getLayout().addComponent(f); + } + +} -- cgit v1.2.3