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/TestForTrees.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/TestForTrees.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/TestForTrees.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/uitest/src/com/vaadin/tests/TestForTrees.java b/uitest/src/com/vaadin/tests/TestForTrees.java index c0d8ec3845..01cd3c2650 100644 --- a/uitest/src/com/vaadin/tests/TestForTrees.java +++ b/uitest/src/com/vaadin/tests/TestForTrees.java @@ -49,7 +49,7 @@ public class TestForTrees extends CustomComponent implements Handler { private final Action[] actions = new Action[] { new Action("edit"), new Action("delete") }; - private Panel al; + private VerticalLayout al; private Tree contextTree; @@ -93,8 +93,9 @@ public class TestForTrees extends CustomComponent implements Handler { t.setImmediate(true); t.addActionHandler(this); final AbstractOrderedLayout ol = (AbstractOrderedLayout) createTestBench(t); - al = new Panel("action log"); - ol.addComponent(al); + al = new VerticalLayout(); + al.setMargin(true); + ol.addComponent(new Panel("action log", al)); main.addComponent(ol); contextTree = t; @@ -141,16 +142,18 @@ public class TestForTrees extends CustomComponent implements Handler { ol.addComponent(t); - final Panel status = new Panel("Events"); + final VerticalLayout statusLayout = new VerticalLayout(); + statusLayout.setMargin(true); + final Panel status = new Panel("Events", statusLayout); final Button clear = new Button("c"); - clear.addListener(new ClickListener() { + clear.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { - status.removeAllComponents(); - status.addComponent(clear); + statusLayout.removeAllComponents(); + statusLayout.addComponent(clear); } }); - status.addComponent(clear); + statusLayout.addComponent(clear); status.setHeight("300px"); status.setWidth("400px"); @@ -160,9 +163,10 @@ public class TestForTrees extends CustomComponent implements Handler { t.addListener(new Listener() { @Override public void componentEvent(Event event) { - status.addComponent(new Label(event.getClass().getName())); + statusLayout + .addComponent(new Label(event.getClass().getName())); // TODO should not use Field.toString() - status.addComponent(new Label("selected: " + statusLayout.addComponent(new Label("selected: " + event.getSource().toString())); } }); |