diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-02-02 20:12:06 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-02-02 20:12:06 +0000 |
commit | 25de179e5a4f673903d9a1d9549f2ff7b1ab8901 (patch) | |
tree | dd31ab7322ad1461d1844a1cc7c2a2aeb96f041b /src/com/itmill | |
parent | e2dd4137abcf2f76c1273957651b324d73137750 (diff) | |
download | vaadin-framework-25de179e5a4f673903d9a1d9549f2ff7b1ab8901.tar.gz vaadin-framework-25de179e5a4f673903d9a1d9549f2ff7b1ab8901.zip |
Now show propertied button works...
svn changeset:432/svn branch:toolkit
Diffstat (limited to 'src/com/itmill')
-rw-r--r-- | src/com/itmill/toolkit/demo/features/FeatureBrowser.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java index c267bfb596..3c67b134c4 100644 --- a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java +++ b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java @@ -32,17 +32,20 @@ import java.util.Iterator; import java.util.StringTokenizer; import com.itmill.toolkit.data.*; -import com.itmill.toolkit.terminal.ClassResource; import com.itmill.toolkit.ui.*; +import com.itmill.toolkit.ui.Button.ClickEvent; +import com.itmill.toolkit.ui.Button.ClickListener; public class FeatureBrowser extends CustomComponent implements - Property.ValueChangeListener { + Property.ValueChangeListener, ClickListener { private Tree features; private Feature currentFeature = null; private OrderedLayout layout; + + private Button propertiesSelect; private OrderedLayout right; @@ -164,9 +167,11 @@ public class FeatureBrowser extends CustomComponent implements right = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL); layout.addComponent(right); - Select propertiesSelect = new Select("Show properties"); + propertiesSelect = new Button("Show properties",this); + propertiesSelect.setSwitchMode(true); right.addComponent(propertiesSelect); properties = currentFeature.getPropertyPanel(); + properties.setVisible(false); right.addComponent(properties); } @@ -208,6 +213,7 @@ public class FeatureBrowser extends CustomComponent implements right.replaceComponent(properties, feature .getPropertyPanel()); properties = feature.getPropertyPanel(); + properties.setVisible(((Boolean)propertiesSelect.getValue()).booleanValue()); getWindow() .setCaption( @@ -220,4 +226,8 @@ public class FeatureBrowser extends CustomComponent implements getApplication().setTheme(themeSelector.toString()); } } + + public void buttonClick(ClickEvent event) { + properties.setVisible(((Boolean)propertiesSelect.getValue()).booleanValue()); + } } |