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/TestContainerChanges.java | |
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/TestContainerChanges.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/TestContainerChanges.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/uitest/src/com/vaadin/tests/TestContainerChanges.java b/uitest/src/com/vaadin/tests/TestContainerChanges.java index 87251c0d65..0e03606cd8 100644 --- a/uitest/src/com/vaadin/tests/TestContainerChanges.java +++ b/uitest/src/com/vaadin/tests/TestContainerChanges.java @@ -177,21 +177,23 @@ public class TestContainerChanges extends CustomComponent { }); buttons.addComponent(b); - Panel p = new Panel("Tree"); + VerticalLayout pl = createPanelLayout(); + Panel p = new Panel("Tree", pl); p.setStyleName(Reindeer.PANEL_LIGHT); h.addComponent(p); Tree tree = new Tree("ITEM_CAPTION_MODE_PROPERTY"); tree.setContainerDataSource(ordered); tree.setItemCaptionPropertyId("Asd"); tree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_PROPERTY); - p.addComponent(tree); + pl.addComponent(tree); tree = new Tree("ITEM_CAPTION_MODE_ITEM"); // nonhierarchical container will get wrapped tree.setContainerDataSource(ordered); tree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_ITEM); - p.addComponent(tree); + pl.addComponent(tree); - p = new Panel("ComboBox"); + pl = createPanelLayout(); + p = new Panel("ComboBox", pl); p.setStyleName(Reindeer.PANEL_LIGHT); h.addComponent(p); ComboBox c = new ComboBox("ITEM_CAPTION_MODE_PROPERTY"); @@ -199,24 +201,31 @@ public class TestContainerChanges extends CustomComponent { c.setContainerDataSource(cont); c.setItemCaptionPropertyId("Asd"); c.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_PROPERTY); - p.addComponent(c); + pl.addComponent(c); c = new ComboBox("ITEM_CAPTION_MODE_ITEM"); c.setImmediate(true); c.setContainerDataSource(cont); c.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_ITEM); - p.addComponent(c); + pl.addComponent(c); - p = new Panel("ListBox"); + pl = createPanelLayout(); + p = new Panel("ListBox", pl); p.setStyleName(Reindeer.PANEL_LIGHT); h.addComponent(p); ListSelect l = new ListSelect("ITEM_CAPTION_MODE_PROPERTY"); l.setContainerDataSource(cont); l.setItemCaptionPropertyId("Asd"); l.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_PROPERTY); - p.addComponent(l); + pl.addComponent(l); l = new ListSelect("ITEM_CAPTION_MODE_ITEM"); l.setContainerDataSource(cont); l.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_ITEM); - p.addComponent(l); + pl.addComponent(l); + } + + private VerticalLayout createPanelLayout() { + VerticalLayout pl = new VerticalLayout(); + pl.setMargin(true); + return pl; } } |