diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-01-24 13:31:34 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-01-24 13:31:34 +0000 |
commit | 40d1b2ef14f38cb762387fd64f6c66ccf55c477f (patch) | |
tree | 4063b47ab50d46ee735563b05b0f7039e271fa44 /src/com/itmill | |
parent | 6a2cbb74bb3561771afd07a43b88e946a754c80a (diff) | |
download | vaadin-framework-40d1b2ef14f38cb762387fd64f6c66ccf55c477f.tar.gz vaadin-framework-40d1b2ef14f38cb762387fd64f6c66ccf55c477f.zip |
Added theme changer select to left bottom corner
svn changeset:323/svn branch:toolkit
Diffstat (limited to 'src/com/itmill')
-rw-r--r-- | src/com/itmill/toolkit/demo/features/FeatureBrowser.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java index 10220750ad..eb7dca6e87 100644 --- a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java +++ b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java @@ -31,6 +31,8 @@ package com.itmill.toolkit.demo.features; import java.util.Iterator; import java.util.StringTokenizer; +import quicktime.streaming.SettingsDialog; + import com.itmill.toolkit.data.*; import com.itmill.toolkit.terminal.ClassResource; import com.itmill.toolkit.ui.*; @@ -44,6 +46,7 @@ public class FeatureBrowser private GridLayout layout; private Component welcome; private boolean initialized = false; + private Select themeSelector = new Select("Theme"); private static final String WELCOME_TEXT = "<h3>Welcome to the IT Mill Toolkit feature tour!</h3>" @@ -74,9 +77,6 @@ public class FeatureBrowser setCompositionRoot(layout); OrderedLayout left = new OrderedLayout(); left.addComponent(features); - Button close = new Button("restart", getApplication(), "close"); - left.addComponent(close); - close.setStyle("link"); layout.addComponent(left, 0, 0, 0, 0); Label greeting = new Label(WELCOME_TEXT, Label.CONTENT_XHTML); OrderedLayout welcomePanel = new OrderedLayout(); @@ -91,6 +91,20 @@ public class FeatureBrowser welcomePanel.addComponent(greeting); layout.addComponent(welcomePanel, 1, 0, 1, 0); + // Theme selector + left.addComponent(themeSelector); + themeSelector.addItem("demo"); + themeSelector.addItem("corporate"); + themeSelector.addItem("base"); + themeSelector.addListener(this); + themeSelector.select("corporate"); + themeSelector.setImmediate(true); + + // Restart button + Button close = new Button("restart", getApplication(), "close"); + left.addComponent(close); + close.setStyle("link"); + // Test component registerFeature( "/UI Components", @@ -194,6 +208,8 @@ public class FeatureBrowser + features.getContainerProperty(id, "name")); } } + } else if (event.getProperty() == themeSelector) { + getApplication().setTheme(themeSelector.toString()); } } } |