diff options
author | Henri Sara <hesara@vaadin.com> | 2012-11-14 13:49:47 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-11-14 13:49:47 +0200 |
commit | aca92f4937cc54f122b20c4bfb6288ee007c9e47 (patch) | |
tree | 7d7ee8e0cfa760e5f6b1da15ea8fe088f542540f /uitest/src/com/vaadin/tests/layouts | |
parent | 1b7a4a1ee9e03f445cbfcbb520a5ac970ccf47de (diff) | |
download | vaadin-framework-aca92f4937cc54f122b20c4bfb6288ee007c9e47.tar.gz vaadin-framework-aca92f4937cc54f122b20c4bfb6288ee007c9e47.zip |
Panel and Window based on AbstractSingleComponentContainer (#2924)
Change-Id: I9eb1f40a02dcad0f756ad2518d86ef1c52aa69c2
Diffstat (limited to 'uitest/src/com/vaadin/tests/layouts')
4 files changed, 21 insertions, 12 deletions
diff --git a/uitest/src/com/vaadin/tests/layouts/DeepComponentTrees.java b/uitest/src/com/vaadin/tests/layouts/DeepComponentTrees.java index e119b91b82..643612d254 100644 --- a/uitest/src/com/vaadin/tests/layouts/DeepComponentTrees.java +++ b/uitest/src/com/vaadin/tests/layouts/DeepComponentTrees.java @@ -38,7 +38,9 @@ public class DeepComponentTrees extends TestBase { Label l = new Label( "This is a nice game to guess how many Layouts your FF2 (or any other browser) can deal with. Due to the worldwide attempt to decrease energy consumption, playing this game is only allowed above 60° longitude betwheen August and May (as excess energy consumed by you CPU is used to heat your room). It is considered wise to save all your work before starting the game."); - root = new Panel("Test box"); + VerticalLayout rootLayout = new VerticalLayout(); + rootLayout.setMargin(true); + root = new Panel("Test box", rootLayout); root.setWidth("600px"); root.setHeight("200px"); final Button b = new Button("Go try your luck with " + i + " layouts!"); diff --git a/uitest/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java b/uitest/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java index e200c40744..524799ab3c 100644 --- a/uitest/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java +++ b/uitest/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java @@ -3,8 +3,8 @@ package com.vaadin.tests.layouts; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.GridLayout; import com.vaadin.ui.Label; -import com.vaadin.ui.Layout.MarginHandler; import com.vaadin.ui.Panel; +import com.vaadin.ui.VerticalLayout; public class GridLayoutInsidePanel extends TestBase { @@ -26,12 +26,14 @@ public class GridLayoutInsidePanel extends TestBase { gl.addComponent(new Label( "A label which defines the size of the GL")); - Panel p = new Panel("Panel 1"); - ((MarginHandler) p.getContent()).setMargin(false); + VerticalLayout pl = new VerticalLayout(); + pl.setMargin(true); + pl.setSizeUndefined(); + Panel p = new Panel("Panel 1", pl); + pl.setMargin(false); p.setSizeUndefined(); - p.getContent().setSizeUndefined(); - p.addComponent(gl); + pl.addComponent(gl); addComponent(p); } { @@ -41,9 +43,9 @@ public class GridLayoutInsidePanel extends TestBase { "A label which defines the size of the GL")); Panel p = new Panel("Panel 2", gl); - ((MarginHandler) p.getContent()).setMargin(false); + gl.setMargin(false); p.setSizeUndefined(); - p.getContent().setSizeUndefined(); + gl.setSizeUndefined(); addComponent(p); } diff --git a/uitest/src/com/vaadin/tests/layouts/LayoutPerformanceTests.java b/uitest/src/com/vaadin/tests/layouts/LayoutPerformanceTests.java index 57c6173895..4e50f0d83b 100644 --- a/uitest/src/com/vaadin/tests/layouts/LayoutPerformanceTests.java +++ b/uitest/src/com/vaadin/tests/layouts/LayoutPerformanceTests.java @@ -241,9 +241,10 @@ public class LayoutPerformanceTests extends TestBase { if (wrapped) { Panel panel = new Panel(container); panel.setSizeFull(); - container = panel; + setTestLayout(panel); + } else { + setTestLayout(container); } - setTestLayout(container); } })); diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java index 69aa100542..28f6dfdbc4 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java @@ -372,7 +372,9 @@ public class GridLayoutTests extends AbstractLayoutTests { row3.setIcon(icons[1]); glo.replaceComponent(x3, x3 = new CheckBox("CHECKBOX")); - glo.replaceComponent(x22, x22 = new Panel("PANEL")); + VerticalLayout pl = new VerticalLayout(); + pl.setMargin(true); + glo.replaceComponent(x22, x22 = new Panel("PANEL", pl)); x22.setIcon(new ThemeResource(CALENDAR_32_PNG)); x3.setIcon(icons[0]); @@ -553,7 +555,9 @@ public class GridLayoutTests extends AbstractLayoutTests { row3.setCaption("long test caption bewucbwuebco or bmort b cbwecubw wbeucwe asdasd asdasda asdasd"); glo.replaceComponent(x3, x3 = new CheckBox("CHECKBOX")); - glo.replaceComponent(x22, x22 = new Panel("PANEL")); + VerticalLayout pl = new VerticalLayout(); + pl.setMargin(true); + glo.replaceComponent(x22, x22 = new Panel("PANEL", pl)); x3.setComponentError(new UserError("component error, user error")); x22.setComponentError(new UserError("component error, user error")); |