aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/demo/features/FeatureWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/itmill/toolkit/demo/features/FeatureWindow.java')
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureWindow.java88
1 files changed, 40 insertions, 48 deletions
diff --git a/src/com/itmill/toolkit/demo/features/FeatureWindow.java b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
index 015e760669..d06e099b0b 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureWindow.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
@@ -1,30 +1,30 @@
/* *************************************************************************
- IT Mill Toolkit
+ IT Mill Toolkit
- Development of Browser User Interfaces Made Easy
+ Development of Browser User Interfaces Made Easy
- Copyright (C) 2000-2006 IT Mill Ltd
-
- *************************************************************************
+ Copyright (C) 2000-2006 IT Mill Ltd
+
+ *************************************************************************
- This product is distributed under commercial license that can be found
- from the product package on license.pdf. Use of this product might
- require purchasing a commercial license from IT Mill Ltd. For guidelines
- on usage, see licensing-guidelines.html
+ This product is distributed under commercial license that can be found
+ from the product package on license.pdf. Use of this product might
+ require purchasing a commercial license from IT Mill Ltd. For guidelines
+ on usage, see licensing-guidelines.html
- *************************************************************************
-
- For more information, contact:
-
- IT Mill Ltd phone: +358 2 4802 7180
- Ruukinkatu 2-4 fax: +358 2 4802 7181
- 20540, Turku email: info@itmill.com
- Finland company www: www.itmill.com
-
- Primary source for information and releases: www.itmill.com
+ *************************************************************************
+
+ For more information, contact:
+
+ IT Mill Ltd phone: +358 2 4802 7180
+ Ruukinkatu 2-4 fax: +358 2 4802 7181
+ 20540, Turku email: info@itmill.com
+ Finland company www: www.itmill.com
+
+ Primary source for information and releases: www.itmill.com
- ********************************************************************** */
+ ********************************************************************** */
package com.itmill.toolkit.demo.features;
@@ -32,8 +32,11 @@ import com.itmill.toolkit.ui.*;
public class FeatureWindow extends Feature {
Button addButton = new Button("Add to application", this, "addWin");
+
Button removeButton = new Button("Remove from application", this, "delWin");
+
Window demoWindow;
+
Form windowProperties;
public FeatureWindow() {
@@ -47,53 +50,42 @@ public class FeatureWindow extends Feature {
// Example panel
Panel show = new Panel("Test Window Control");
- ((OrderedLayout) show.getLayout()).setOrientation(
- OrderedLayout.ORIENTATION_HORIZONTAL);
+ ((OrderedLayout) show.getLayout())
+ .setOrientation(OrderedLayout.ORIENTATION_HORIZONTAL);
show.addComponent(addButton);
show.addComponent(removeButton);
updateWinStatus();
l.addComponent(show);
// Properties
- PropertyPanel p = new PropertyPanel(demoWindow);
- p.dependsOn(addButton);
- p.dependsOn(removeButton);
- windowProperties =
- p.createBeanPropertySet(
- new String[] {
- "width",
- "height",
- "name",
- "border",
- "theme",
- "scrollable",
- "scrollOffsetX",
- "scrollOffsetY" });
- windowProperties.replaceWithSelect(
- "border",
- new Object[] {
+ propertyPanel = new PropertyPanel(demoWindow);
+ propertyPanel.dependsOn(addButton);
+ propertyPanel.dependsOn(removeButton);
+ windowProperties = propertyPanel.createBeanPropertySet(new String[] {
+ "width", "height", "name", "border", "theme", "scrollable",
+ "scrollOffsetX", "scrollOffsetY" });
+ windowProperties.replaceWithSelect("border", new Object[] {
new Integer(Window.BORDER_DEFAULT),
new Integer(Window.BORDER_NONE),
- new Integer(Window.BORDER_MINIMAL)},
- new Object[] { "Default", "None", "Minimal" });
- p.addProperties("Window Properties", windowProperties);
- l.addComponent(p);
+ new Integer(Window.BORDER_MINIMAL) }, new Object[] { "Default",
+ "None", "Minimal" });
+ propertyPanel.addProperties("Window Properties", windowProperties);
return l;
}
protected String getExampleSrc() {
return "Window win = new Window();\n"
- + "getApplication().addWindow(win);\n";
+ + "getApplication().addWindow(win);\n";
}
protected String getDescriptionXHTML() {
return "The window support in IT Mill Toolkit allows for opening and closing windows, "
- + "refreshing one window from another (for asynchronous terminals), "
- + "resizing windows and scrolling window content. "
- + "There are also a number of preset window border styles defined by "
- + "this feature.";
+ + "refreshing one window from another (for asynchronous terminals), "
+ + "resizing windows and scrolling window content. "
+ + "There are also a number of preset window border styles defined by "
+ + "this feature.";
}
protected String getImage() {