aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2008-12-23 08:47:44 +0000
committerArtur Signell <artur.signell@itmill.com>2008-12-23 08:47:44 +0000
commit76aedb1690ac753c2efd0a0682de35e892b2e218 (patch)
tree55986e54109cebec41250bac1046866dc4826b3c /src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java
parent3026e47f8e553dd8a122548b36a5c3942786fb77 (diff)
downloadvaadin-framework-76aedb1690ac753c2efd0a0682de35e892b2e218.tar.gz
vaadin-framework-76aedb1690ac753c2efd0a0682de35e892b2e218.zip
Updated feature browser in automatedtests package to current feature browser.
svn changeset:6342/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java')
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java
index 496af76842..c2f6e2e930 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/TreeExample.java
@@ -10,8 +10,8 @@ import com.itmill.toolkit.data.Property.ValueChangeEvent;
import com.itmill.toolkit.event.Action;
import com.itmill.toolkit.ui.AbstractSelect;
import com.itmill.toolkit.ui.CustomComponent;
+import com.itmill.toolkit.ui.HorizontalLayout;
import com.itmill.toolkit.ui.Label;
-import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.Panel;
import com.itmill.toolkit.ui.TextField;
import com.itmill.toolkit.ui.Tree;
@@ -37,8 +37,8 @@ public class TreeExample extends CustomComponent implements Action.Handler,
TextField editor;
public TreeExample() {
- final OrderedLayout main = new OrderedLayout(
- OrderedLayout.ORIENTATION_HORIZONTAL);
+ final HorizontalLayout main = new HorizontalLayout();
+ main.setWidth("100%");
main.setDebugId("mainLayout");
main.setMargin(true);
setCompositionRoot(main);
@@ -46,7 +46,7 @@ public class TreeExample extends CustomComponent implements Action.Handler,
// Panel w/ Tree
Panel p = new Panel("Select item");
p.setStyleName(Panel.STYLE_LIGHT);
- p.setWidth(250);
+ p.setWidth("250px");
// Description
p.addComponent(new Label(desc));
// Tree with a few items
@@ -81,6 +81,7 @@ public class TreeExample extends CustomComponent implements Action.Handler,
editor.setColumns(15);
p.addComponent(editor);
main.addComponent(p);
+ main.setExpandRatio(p, 1);
}
public Action[] getActions(Object target, Object sender) {
@@ -153,7 +154,9 @@ public class TreeExample extends CustomComponent implements Action.Handler,
final Property p = item.getItemProperty(CAPTION_PROPERTY);
p.setValue(caption);
if (parent != null) {
+ tree.setChildrenAllowed(parent, true);
tree.setParent(id, parent);
+ tree.setChildrenAllowed(id, false);
}
return id;
}