diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/tree')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.java | 9 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.java b/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.java index 1fa73ccd6d..ef378b420a 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeHorizontalResize.java @@ -8,6 +8,7 @@ import com.vaadin.server.ThemeResource; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Panel; import com.vaadin.ui.Tree; +import com.vaadin.ui.VerticalLayout; public class TreeHorizontalResize extends TestBase { @@ -23,10 +24,12 @@ public class TreeHorizontalResize extends TestBase { @Override protected void setup() { - Panel treePanel = new Panel(); + VerticalLayout treeLayout = new VerticalLayout(); + treeLayout.setMargin(true); + treeLayout.setSizeUndefined(); + Panel treePanel = new Panel(treeLayout); treePanel.setHeight("500px"); treePanel.setWidth(null); - treePanel.getContent().setSizeUndefined(); addComponent(treePanel); Tree tree = new Tree(); @@ -35,7 +38,7 @@ public class TreeHorizontalResize extends TestBase { for (Iterator<?> it = tree.rootItemIds().iterator(); it.hasNext();) { tree.expandItemsRecursively(it.next()); } - treePanel.addComponent(tree); + treeLayout.addComponent(tree); } @Override diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java b/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java index b3ab5c2b01..ba128025cd 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java @@ -7,6 +7,7 @@ import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Label; import com.vaadin.ui.Panel; import com.vaadin.ui.Tree; +import com.vaadin.ui.VerticalLayout; public class TreeScrollingOnSelection extends TestBase { private static final long serialVersionUID = 4082075610259697145L; @@ -36,8 +37,10 @@ public class TreeScrollingOnSelection extends TestBase { }); tree.setImmediate(true); - Panel panel = new Panel(); - panel.addComponent(tree); + VerticalLayout panelLayout = new VerticalLayout(); + panelLayout.setMargin(true); + Panel panel = new Panel(panelLayout); + panelLayout.addComponent(tree); panel.setWidth("200px"); panel.setHeight("300px"); |