diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/tickets/Ticket1435.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/tickets/Ticket1435.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1435.java b/uitest/src/com/vaadin/tests/tickets/Ticket1435.java index 42b6b90c49..c530db7aec 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1435.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1435.java @@ -10,7 +10,6 @@ import com.vaadin.ui.CustomComponent; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; import com.vaadin.ui.Layout; -import com.vaadin.ui.Layout.MarginHandler; import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.Panel; import com.vaadin.ui.Table; @@ -52,7 +51,8 @@ public class Ticket1435 extends LegacyApplication { HorizontalLayout header = new HorizontalLayout(); // This is where the actual data is put. - Panel container = new Panel(); + VerticalLayout containerLayout = new VerticalLayout(); + Panel container = new Panel(containerLayout); // Last known height before the panel was collapsed private float lastHeight = -1; @@ -67,6 +67,8 @@ public class Ticket1435 extends LegacyApplication { initHeader(labelString); + containerLayout.setMargin(true); + initContainer(); } @@ -118,7 +120,7 @@ public class Ticket1435 extends LegacyApplication { buttonContainer.addComponent(collapse); collapse.setStyleName("collapse"); - collapse.addListener(new Button.ClickListener() { + collapse.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (useWorkaround) { @@ -144,7 +146,7 @@ public class Ticket1435 extends LegacyApplication { }); if (useWorkaround) { - expand.addListener(new Button.ClickListener() { + expand.addClickListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -160,8 +162,8 @@ public class Ticket1435 extends LegacyApplication { private void initContainer() { container.setStyleName("custompanel"); container.setSizeFull(); - ((MarginHandler) container.getContent()).setMargin(false); - container.getContent().setSizeFull(); + containerLayout.setMargin(false); + containerLayout.setSizeFull(); root.addComponent(container); root.setExpandRatio(container, 1); } @@ -197,8 +199,8 @@ public class Ticket1435 extends LegacyApplication { } public void setPanelComponent(Component component) { - container.removeAllComponents(); - container.addComponent(component); + containerLayout.removeAllComponents(); + containerLayout.addComponent(component); } } |