summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-11-04 14:16:46 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-11-04 14:16:46 +0000
commit8f56bfcef48a74fd5f4e0afa7699bc9c25cba49c (patch)
tree13e06f4643db08bfbcd2196e6a0059b9c132f856 /src
parentd52aa32ef0c06c294711e10aba17d317e8e61f17 (diff)
downloadvaadin-framework-8f56bfcef48a74fd5f4e0afa7699bc9c25cba49c.tar.gz
vaadin-framework-8f56bfcef48a74fd5f4e0afa7699bc9c25cba49c.zip
modified FeatureBrowser to be compatible with current layout system
svn changeset:5815/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
index 1b571caafa..478bfa1f67 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
@@ -18,7 +18,6 @@ import com.itmill.toolkit.ui.AbstractSelect;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Component;
import com.itmill.toolkit.ui.Embedded;
-import com.itmill.toolkit.ui.ExpandLayout;
import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.Layout;
import com.itmill.toolkit.ui.OrderedLayout;
@@ -166,8 +165,9 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
tree.expandItemsRecursively(rootId);
for (Iterator i = container.getItemIds().iterator(); i.hasNext();) {
Object id = i.next();
- if (container.getChildren(id) == null)
+ if (container.getChildren(id) == null) {
tree.setChildrenAllowed(id, false);
+ }
}
split.addComponent(tree);
@@ -196,7 +196,8 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
table.setImmediate(true);
split2.addComponent(table);
- final ExpandLayout exp = new ExpandLayout();
+ final OrderedLayout exp = new OrderedLayout();
+ exp.setSizeFull();
exp.setMargin(true);
split2.addComponent(exp);
@@ -208,13 +209,13 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
.next();
String caption = ts.getTabCaption(component);
try {
- component = (Component) component.getClass().newInstance();
+ component = component.getClass().newInstance();
} catch (Exception e) {
// Could not create
return;
}
Window w = new Window(caption);
- w.setWidth(640);
+ w.setWidth("640px");
if (Layout.class.isAssignableFrom(component.getClass())) {
w.setLayout((Layout) component);
} else {
@@ -234,8 +235,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
Window w = getWindow(caption);
if (w == null) {
try {
- component = (Component) component.getClass()
- .newInstance();
+ component = component.getClass().newInstance();
} catch (final Exception e) {
// Could not create
return;
@@ -264,7 +264,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
ts.setSizeFull();
ts.addTab(new Label(""), "Choose example", null);
exp.addComponent(ts);
- exp.expand(ts);
+ exp.setExpandRatio(ts, 1);
final Label status = new Label(
"<a href=\"http://www.itmill.com/developers/\">Developer Area</a>"
@@ -309,8 +309,9 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
public void valueChange(ValueChangeEvent event) {
if (event.getProperty() == tree) {
final Object id = tree.getValue();
- if (id == null)
+ if (id == null) {
return;
+ }
final Item item = tree.getItem(id);
//
String newSection;