]> source.dussan.org Git - vaadin-framework.git/commitdiff
Many language fixes.
authorJani Laakso <jani.laakso@itmill.com>
Mon, 12 Feb 2007 00:33:32 +0000 (00:33 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Mon, 12 Feb 2007 00:33:32 +0000 (00:33 +0000)
Removed TODO's.

Added documentational content.

Removed most pictures which are no longer required.
- also this slows down loading of the application on "slow" links.
- pictures were not that good anyway.

Property panel is now also applicable.

Fixed:
#387   FeatureBrowser is full of descriptions saying TODO
#337   FeatureBrowser: Source tabs in "features" that do not have source
#374   FeatureBrowser: When opening a feature with no properties, hide propertypanel (on Java)
#395   FeatureBrowser: Hide non-working features
#375   FeatureBrowser: Should start from welcome (?) and select it from tree

svn changeset:674/svn branch:toolkit

38 files changed:
src/com/itmill/toolkit/demo/features/Feature.java
src/com/itmill/toolkit/demo/features/FeatureBrowser.java
src/com/itmill/toolkit/demo/features/FeatureBuffering.java
src/com/itmill/toolkit/demo/features/FeatureButton.java
src/com/itmill/toolkit/demo/features/FeatureContainers.java
src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
src/com/itmill/toolkit/demo/features/FeatureDateField.java
src/com/itmill/toolkit/demo/features/FeatureEmbedded.java
src/com/itmill/toolkit/demo/features/FeatureForm.java
src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
src/com/itmill/toolkit/demo/features/FeatureItems.java
src/com/itmill/toolkit/demo/features/FeatureLabel.java
src/com/itmill/toolkit/demo/features/FeatureLink.java
src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
src/com/itmill/toolkit/demo/features/FeaturePanel.java
src/com/itmill/toolkit/demo/features/FeatureProperties.java
src/com/itmill/toolkit/demo/features/FeatureSelect.java
src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
src/com/itmill/toolkit/demo/features/FeatureTable.java
src/com/itmill/toolkit/demo/features/FeatureTextField.java
src/com/itmill/toolkit/demo/features/FeatureTree.java
src/com/itmill/toolkit/demo/features/FeatureUpload.java
src/com/itmill/toolkit/demo/features/FeatureValidators.java
src/com/itmill/toolkit/demo/features/FeatureWindow.java
src/com/itmill/toolkit/demo/features/IntroBasic.java
src/com/itmill/toolkit/demo/features/IntroComponents.java
src/com/itmill/toolkit/demo/features/IntroDataHandling.java
src/com/itmill/toolkit/demo/features/IntroDataModel.java
src/com/itmill/toolkit/demo/features/IntroItemContainers.java
src/com/itmill/toolkit/demo/features/IntroLayouts.java
src/com/itmill/toolkit/demo/features/IntroTerminal.java
src/com/itmill/toolkit/demo/features/IntroWelcome.java
src/com/itmill/toolkit/demo/features/buffering.jpg [deleted file]
src/com/itmill/toolkit/demo/features/containers.jpg [deleted file]
src/com/itmill/toolkit/demo/features/customlayout.jpg [deleted file]
src/com/itmill/toolkit/demo/features/properties.jpg [deleted file]
src/com/itmill/toolkit/demo/features/validators.gif [deleted file]

index c59eeb30ab14f287d076f0612287a876abe75287..7d20da755a4cdf1f7fb430f4c89cb37d12e8550a 100644 (file)
 
 package com.itmill.toolkit.demo.features;
 
+import com.itmill.toolkit.Application;
 import com.itmill.toolkit.terminal.ClassResource;
 import com.itmill.toolkit.terminal.Resource;
 import com.itmill.toolkit.ui.*;
 
 public abstract class Feature extends CustomComponent {
 
+       private static final String PROP_REMINDER_TEXT = ""
+                       + "<br /><br />Note: Use <b>Properties</b> panel located at the top"
+                       + " right corner to try out how different properties affect"
+                       + " the presentation or functionality of currently selected component.";
+
+       private boolean propsReminder = true;
+
        private OrderedLayout layout;
 
        private TabSheet ts;
@@ -51,13 +59,20 @@ public abstract class Feature extends CustomComponent {
                layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
                setCompositionRoot(layout);
        }
-       
+
        /**
         * Actual URL consists of "/doc/api/com/itmill/toolkit/"+url
+        * 
         * @param url
         */
        public void setJavadocURL(String url) {
-               javadoc.setValue("<iframe width=\"100%\" src=\"/doc/api/com/itmill/toolkit/"+url+"\"></iframe>");
+               // TODO: FIXME!!!
+               javadoc
+                               .setValue("<iframe width=\"100%\" src=\"/doc/api/com/itmill/toolkit/"
+                                               + url + "\"></iframe>");
+               javadoc
+                               .setValue("<iframe width=\"100%\" src=\"http://toolkit.itmill.com/doc/api/com/itmill/toolkit/"
+                                               + url + "\"></iframe>");
        }
 
        /**
@@ -65,14 +80,13 @@ public abstract class Feature extends CustomComponent {
         * attached to application
         */
        public void attach() {
-
                super.attach();
 
                // Check if the feature is already initialized
                if (initialized)
                        return;
                initialized = true;
-               
+
                // Javadoc
                javadoc = new Label();
                javadoc.setContentMode(Label.CONTENT_RAW);
@@ -83,37 +97,42 @@ public abstract class Feature extends CustomComponent {
                        layout.addComponent(demo);
 
                ts = new TabSheet();
-               layout.addComponent(ts);
 
                // Description tab
                String desc = getDescriptionXHTML();
                String title = getTitle();
-               if (desc != null && title != null) {
+               if (desc != null) {
                        GridLayout gl = new GridLayout(2, 1);
                        if (getImage() != null)
                                gl.addComponent(new Embedded("", new ClassResource(getImage(),
                                                this.getApplication())));
-                       gl.addComponent(new Label("<h2>" + title + "</h2>" + desc,
-                                       Label.CONTENT_XHTML));
+                       String label = "";
+                       if (title != null)
+                               label += "<h2>" + title + "</h2>";
+                       label += desc;
+                       if (propsReminder)
+                               label += PROP_REMINDER_TEXT;
+                       gl.addComponent(new Label(label, Label.CONTENT_XHTML));
                        ts.addTab(gl, "Description", null);
                }
 
+               // Javadoc tab
+               if (!javadoc.getValue().equals(""))
+                       ts.addTab(javadoc, "Javadoc", null);
+
                // Code Sample tab
                String example = getExampleSrc();
                if (example != null) {
                        OrderedLayout l = new OrderedLayout();
-                       l.addComponent(new Label("<h2>" + getTitle() + " example</h2>",
-                                       Label.CONTENT_XHTML));
+                       if (getTitle() != null)
+                               l.addComponent(new Label("<b>// " + getTitle() + " example</b>",
+                                               Label.CONTENT_XHTML));
                        l.addComponent(new Label(example, Label.CONTENT_PREFORMATTED));
                        ts.addTab(l, "Code Sample", null);
                }
-               
-               // Javadoc tab
-               ts.addTab(javadoc, "Javadoc", null);
 
-               // Properties tab
-               // if (properties != null)
-               // ts.addTab(properties, "Properties", null);
+               layout.addComponent(ts);
+
        }
 
        /** Get the desctiption of the feature as XHTML fragment */
@@ -152,4 +171,8 @@ public abstract class Feature extends CustomComponent {
                return propertyPanel;
        }
 
+       public void setPropsReminder(boolean propsReminder) {
+               this.propsReminder = propsReminder;
+       }
+
 }
\ No newline at end of file
index 41e8979ce7d62b108dafbaa05609136d2bfcb69b..8d63a162d0d90e4cd5625f8666196e800c6a2396 100644 (file)
@@ -149,7 +149,7 @@ public class FeatureBrowser extends CustomComponent implements
                        features.expandItem(i.next());
 
                // Add demo component and tabs
-               currentFeature = new FeatureTable();
+               currentFeature = new IntroWelcome();
                layout.addComponent(currentFeature);
 
                // Add properties
index 3071c3a3d6f1a36168900c5ebf59cfec236d35fd..da345e5a5a14f92dee57c7958e4ab338bc520323 100644 (file)
 /* *************************************************************************
  
                              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;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class FeatureBuffering extends Feature {
-       
+
+       private static final String INTRO_TEXT = ""
+                       + "IT Mill Toolkit data model provides interface for implementing "
+                       + "buffering in data components. The basic idea is that a component "
+                       + "reading their state from data source can implement "
+                       + "Buffered-interface, for storing the value internally. "
+                       + "Buffering provides transactional access "
+                       + "for setting data: data can be put to a component's buffer and "
+                       + "afterwards committed to or discarded by re-reding it from the data source. "
+                       + "The buffering can be used for creating interactive interfaces "
+                       + "as well as caching the data for performance reasons."
+                       + "<br /><br />Buffered interface contains methods for committing and discarding "
+                       + "changes to an object and support for controlling buffering mode "
+                       + "with read-through and write-through modes. "
+                       + "Read-through mode means that the value read from the buffered "
+                       + "object is constantly up to date with the data source. "
+                       + "Respectively the write-through mode means that all changes to the object are "
+                       + "immediately updated to the data source.";
+
        public FeatureBuffering() {
                super();
        }
-       
+
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
+               Panel panel = new Panel();
+               panel.setCaption("Buffering");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
                setJavadocURL("data/Buffered.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "<p>IT Mill Toolkit data model provides interface for implementing "
-                       + "buffering in data components. The basic idea is that a component "
-                       + "reading their state from data source can implement "
-                       + "Buffered-interface, for storing the value internally. "
-                       + "Buffering provides transactional access "
-                       + "for setting data: data can be put to a component's buffer and "
-                       + "afterwards committed to or discarded by re-reding it from the data source. "
-                       + "The buffering can be used for creating interactive interfaces "
-                       + "as well as caching the data for performance reasons.</p>"
-                       + "<p>Buffered interface contains methods for committing and discarding "
-                       + "changes to an object and support for controlling buffering mode "
-                       + "with read-through and write-through modes. "
-                       + "Read-through mode means that the value read from the buffered "
-                       + "object is constantly up to date with the data source. "
-                       + "Respectively the write-through mode means that all changes to the object are "
-                       + "immediately updated to the data source.</p>";
+               return null;
        }
 
-
        protected String getImage() {
-               return "buffering.jpg";
+               return null;
        }
 
        protected String getTitle() {
-               return "Introduction of Data Model Buffering";
+               return null;
        }
 
 }
index 364e759b6ed058b6e691ae5b97382c7ee37f876e..502a4d9272cb8e8b78d13016e8409dff2694abf1 100644 (file)
@@ -53,7 +53,7 @@ public class FeatureButton extends Feature {
                propertyPanel.addProperties("Button Properties", ap);
 
                setJavadocURL("ui/Button.html");
-               
+
                return l;
        }
 
index 94d093ae56da1f6786daced30953b1753ba774a3..5b3f5fe1343277b9305929d801a5669a8e520b3d 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class FeatureContainers extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Container is the most advanced of the data "
+                       + "model supported by IT Mill Toolkit. It provides a very flexible "
+                       + "way of managing set of items that share common properties. Each "
+                       + "item is identified by an item id. "
+                       + "Properties can be requested from container with item "
+                       + "and property ids. Other way of accessing properties is to first "
+                       + "request an item from container and then request its properties "
+                       + "from it."
+                       + "<br /><br />Container interface was designed with flexibility and "
+                       + "efficiency in mind. It contains inner interfaces for ordering "
+                       + "the items sequentially, indexing the items and accessing them "
+                       + "hierarchically. Those ordering models provide basis for "
+                       + "Table, Tree and Select UI components. As with other data "
+                       + "models, the containers support events for notifying about the "
+                       + "changes."
+                       + "<br /><br />Set of utilities for converting between container models by "
+                       + "adding external indexing or hierarchy into existing containers. "
+                       + "In memory containers implementing indexed and hierarchical "
+                       + "models provide easy to use tools for setting up in memory data "
+                       + "storages. There is even a hierarchical container for direct "
+                       + "file system access.";
+
        public FeatureContainers() {
                super();
        }
-       
+
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Containers");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
                setJavadocURL("data/Container.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>Container is the most advanced of the data "
-                               + "model supported by IT Mill Toolkit. It provides a very flexible "
-                               + "way of managing set of items that share common properties. Each "
-                               + "item is identified by an item id. "
-                               + "Properties can be requested from container with item "
-                               + "and property ids. Other way of accessing properties is to first "
-                               + "request an item from container and then request its properties "
-                               + "from it. </p>"
-                               + "<p>Container interface was designed with flexibility and "
-                               + "efficiency in mind. It contains inner interfaces for ordering "
-                               + "the items sequentially, indexing the items and accessing them "
-                               + "hierarchically. Those ordering models provide basis for "
-                               + "Table, Tree and Select UI components. As with other data "
-                               + "models, the containers support events for notifying about the "
-                               + "changes.</p>"
-                               + "<p>Set of utilities for converting between container models by "
-                               + "adding external indexing or hierarchy into existing containers. "
-                               + "In memory containers implementing indexed and hierarchical "
-                               + "models provide easy to use tools for setting up in memory data "
-                               + "storages. There is even a hierarchical container for direct "
-                               + "file system access.</p>";
+               return null;
        }
 
-
        protected String getImage() {
-               return "containers.jpg";
+               return null;
        }
 
        protected String getTitle() {
-               return "Introduction of Data Model Containers";
+               return null;
        }
 
 }
index a9900e4b63947a8b7c279e6babe7eed1e9805b4b..b491f406d72f3bc01d5b181b7151073cfe9fb353 100644 (file)
@@ -32,48 +32,65 @@ import com.itmill.toolkit.ui.*;
 
 public class FeatureCustomLayout extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "A container component with freely designed layout and style. The "
+                       + "container consists of items with textually represented locations. Each "
+                       + "item contains one sub-component. The adapter and theme are resposible "
+                       + "for rendering the layout with given style by placing the items on the "
+                       + "screen in defined locations."
+                       + "<br /><br />The definition of locations is not fixed - the each style can define its "
+                       + "locations in a way that is suitable for it. One typical example would be "
+                       + "to create visual design for a website as a custom layout: the visual design "
+                       + "could define locations for \"menu\", \"body\" and \"title\" for example. "
+                       + "The layout would then be implemented e.g. as plain HTML file."
+                       + "<br /><br />The default theme handles the styles that are not defined by just drawing "
+                       + "the subcomponents with flowlayout.";
+
+       protected Component getDemoComponent() {
+               OrderedLayout l = new OrderedLayout();
+
+               Panel panel = new Panel();
+               panel.setCaption("Custom Layout");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
+
+               // Properties
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("ui/CustomLayout.html");
+
+               return l;
+       }
+
        protected String getDescriptionXHTML() {
-               return "<p>A container component with freely designed layout and style. The "
-                               + "container consists of items with textually represented locations. Each "
-                               + "item contains one sub-component. The adapter and theme are resposible "
-                               + "for rendering the layout with given style by placing the items on the "
-                               + "screen in defined locations.</p>"
-                               + "<p>The definition of locations is not fixed - the each style can define its "
-                               + "locations in a way that is suitable for it. One typical example would be "
-                               + "to create visual design for a website as a custom layout: the visual design "
-                               + "could define locations for \"menu\", \"body\" and \"title\" for example. "
-                               + "The layout would then be implemented as XLS-template with for given style.</p>"
-                               + "<p>The default theme handles the styles that are not defined by just drawing "
-                               + "the subcomponents with flowlayout.</p>";
+               return null;
        }
 
        protected String getExampleSrc() {
-               return "CustomLayout c = new CustomLayout(\"style-name\");\n"
-                               + "c.addComponent(new Label(\"foo\"),\"foo-location\");\n"
-                               + "c.addComponent(new Label(\"bar\"),\"bar-location\");\n";
+               return "CustomLayout c = new CustomLayout(\"mystyle\");\n"
+                               + "c.addComponent(new Label(\"Example description\"),\"label1-location\");\n"
+                               + "c.addComponent(new Button(\"Example action\"),\"example-action-location\");\n";
        }
 
        protected String getImage() {
-               return "customlayout.jpg";
+               return null;
        }
 
        protected String getTitle() {
-               return "CustomLayout";
-       }
-
-       protected Component getDemoComponent() {
-               OrderedLayout l = new OrderedLayout();
-
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
-
-               // Properties
-               propertyPanel = null;
-               
-               setJavadocURL("ui/CustomLayout.html");
-
-               return l;
+               return "Custom Layout";
        }
 
 }
index 24c9b46afb50331db3548284793770eace7d603f..570b2c370b67da65a8677634675e5a5d1447c91b 100644 (file)
@@ -60,14 +60,13 @@ public class FeatureDateField extends Feature {
 
                // Create locale selector
                // TODO: see #244 (broken for AJAX mode), known issue exists
-               /* DISABLE UNTIL WORKS
-               Select selector = new Select("Application Locale", localeContainer);
-               selector.setItemCaptionPropertyId("name");
-               selector.setImmediate(true);
-               selector.setPropertyDataSource(new MethodProperty(
-                               this.getApplication(), "locale"));
-               l.addComponent(selector);
-               */
+               /*
+                * DISABLE UNTIL WORKS Select selector = new Select("Application
+                * Locale", localeContainer); selector.setItemCaptionPropertyId("name");
+                * selector.setImmediate(true); selector.setPropertyDataSource(new
+                * MethodProperty( this.getApplication(), "locale"));
+                * l.addComponent(selector);
+                */
 
                // Properties
                propertyPanel = new PropertyPanel(df);
@@ -91,8 +90,8 @@ public class FeatureDateField extends Feature {
                themes.addItem("calendar").getItemProperty(
                                themes.getItemCaptionPropertyId()).setValue("calendar");
                propertyPanel.addProperties("DateField Properties", ap);
-               
-               setJavadocURL("ui/DateField");
+
+               setJavadocURL("ui/DateField.html");
 
                return l;
        }
@@ -100,21 +99,20 @@ public class FeatureDateField extends Feature {
        protected String getExampleSrc() {
                return "DateField df = new DateField(\"Caption\");\n"
                                + "df.setValue(new java.util.Date());\n";
-
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>Representing Dates and times and providing a way to select "
+               return "Representing Dates and times and providing a way to select "
                                + "or enter some specific date and/or time is an typical need in "
-                               + "data-entry userinterfaces. IT Mill Toolkit provides a DateField "
+                               + "data-entry user interfaces (UI). IT Mill Toolkit provides a DateField "
                                + "component that is intuitive to use and yet controllable through "
-                               + "its properties.</p>"
-                               + "<p>The calendar-style allows point-and-click selection "
+                               + "its properties."
+                               + "<br /><br />The calendar-style allows point-and-click selection "
                                + "of dates while text-style shows only minimalistic user interface."
-                               + "Validators may be bound to the component to check and "
-                               + "validate the given input.</p>"
-                               + "<p>On the demo tab you can try out how the different properties affect the "
-                               + "presentation of the component.</p>";
+                               + " Validators may be bound to the component to check and "
+                               + "validate the given input."
+                               + "<br /><br />On the demo tab you can try out how the different properties affect the "
+                               + "presentation of the component.";
        }
 
        protected String getImage() {
index e152e38ed858c30ccd0444e0fd2b2f38527fe45e..e63792f2cd2503adaa00bffaf685099a01d63b1d 100644 (file)
@@ -42,8 +42,8 @@ public class FeatureEmbedded extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               ClassResource flashResource = new ClassResource(
-                               "itmill_spin.swf", this.getApplication());
+               ClassResource flashResource = new ClassResource("itmill_spin.swf", this
+                               .getApplication());
                Embedded emb = new Embedded("Embedded Caption", flashResource);
                emb.setType(Embedded.TYPE_OBJECT);
                emb.setMimeType("application/x-shockwave-flash");
@@ -51,41 +51,40 @@ public class FeatureEmbedded extends Feature {
                emb.setHeight(100);
                l.addComponent(emb);
 
-               
                // Properties
                propertyPanel = null;
                if (false) {
-               propertyPanel = new PropertyPanel(emb);
-               Form ap = propertyPanel.createBeanPropertySet(new String[] { "type",
-                               "source", "width", "height", "widthUnits", "heightUnits",
-                               "codebase", "codetype", "archive", "mimeType", "standby",
-                               "classId" });
-               ap.replaceWithSelect("type", new Object[] {
-                               new Integer(Embedded.TYPE_IMAGE),
-                               new Integer(Embedded.TYPE_OBJECT) }, new Object[] { "Image",
-                               "Object" });
-               Object[] units = new Object[Sizeable.UNIT_SYMBOLS.length];
-               Object[] symbols = new Object[Sizeable.UNIT_SYMBOLS.length];
-               for (int i = 0; i < units.length; i++) {
-                       units[i] = new Integer(i);
-                       symbols[i] = Sizeable.UNIT_SYMBOLS[i];
-               }
-               ap.replaceWithSelect("heightUnits", units, symbols);
-               ap.replaceWithSelect("widthUnits", units, symbols);
-               ap.replaceWithSelect("source", new Object[] { null,
-                               new ClassResource("m-bullet-blue.gif", getApplication()) },
-                               new Object[] { "null", "IT Mill (m)" });
-               propertyPanel.addProperties("Embedded Properties", ap);
-               propertyPanel.getField("standby").setDescription(
-                               "The text to display while loading the object.");
-               propertyPanel.getField("codebase").setDescription(
-                               "root-path used to access resources with relative paths.");
-               propertyPanel.getField("codetype").setDescription(
-                               "MIME-type of the code.");
-               propertyPanel
-                               .getField("classId")
-                               .setDescription(
-                                               "Unique object id. This can be used for example to identify windows components.");
+                       propertyPanel = new PropertyPanel(emb);
+                       Form ap = propertyPanel.createBeanPropertySet(new String[] {
+                                       "type", "source", "width", "height", "widthUnits",
+                                       "heightUnits", "codebase", "codetype", "archive",
+                                       "mimeType", "standby", "classId" });
+                       ap.replaceWithSelect("type", new Object[] {
+                                       new Integer(Embedded.TYPE_IMAGE),
+                                       new Integer(Embedded.TYPE_OBJECT) }, new Object[] {
+                                       "Image", "Object" });
+                       Object[] units = new Object[Sizeable.UNIT_SYMBOLS.length];
+                       Object[] symbols = new Object[Sizeable.UNIT_SYMBOLS.length];
+                       for (int i = 0; i < units.length; i++) {
+                               units[i] = new Integer(i);
+                               symbols[i] = Sizeable.UNIT_SYMBOLS[i];
+                       }
+                       ap.replaceWithSelect("heightUnits", units, symbols);
+                       ap.replaceWithSelect("widthUnits", units, symbols);
+                       ap.replaceWithSelect("source", new Object[] { null,
+                                       new ClassResource("m-bullet-blue.gif", getApplication()) },
+                                       new Object[] { "null", "IT Mill (m)" });
+                       propertyPanel.addProperties("Embedded Properties", ap);
+                       propertyPanel.getField("standby").setDescription(
+                                       "The text to display while loading the object.");
+                       propertyPanel.getField("codebase").setDescription(
+                                       "root-path used to access resources with relative paths.");
+                       propertyPanel.getField("codetype").setDescription(
+                                       "MIME-type of the code.");
+                       propertyPanel
+                                       .getField("classId")
+                                       .setDescription(
+                                                       "Unique object id. This can be used for example to identify windows components.");
                }
                setJavadocURL("ui/Embedded.html");
 
@@ -99,10 +98,10 @@ public class FeatureEmbedded extends Feature {
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>The embedding feature allows for adding images, multimedia and other non-specified "
+               return "The embedding feature allows for adding images, multimedia and other non-specified "
                                + "content to your application. "
                                + "The feature has provisions for embedding both applets and Active X controls. "
-                               + "Actual support for embedded media types is left to the terminal.</p>";
+                               + "Actual support for embedded media types is left to the terminal.";
        }
 
        protected String getImage() {
index 4e0fda7c850f8442ae9d7239b42fe5ad4c810208..488b9e9fcbc60d42c83a850a28ee6a562dec394d 100644 (file)
@@ -52,7 +52,7 @@ public class FeatureForm extends Feature implements
                        demo = new OrderedLayout();
                        createDemo();
                }
-               
+
                setJavadocURL("ui/Form.html");
 
                return demo;
@@ -67,7 +67,7 @@ public class FeatureForm extends Feature implements
                        test = new Form();
                else
                        test = new Form(formLayout);
-               
+
                demo.addComponent(test);
                OrderedLayout actions = new OrderedLayout(
                                OrderedLayout.ORIENTATION_HORIZONTAL);
@@ -160,13 +160,13 @@ public class FeatureForm extends Feature implements
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>Form is a flexible, yet simple container for fields. "
+               return "Form is a flexible, yet simple container for fields. "
                                + " It provides support for any layouts and provides buffering interface for"
                                + " easy connection of commit- and discard buttons. All the form"
                                + " fields can be customized by adding validators, setting captions and icons, "
                                + " setting immediateness, etc. Also direct mechanism for replacing existing"
-                               + " fields with selections is given.</p>"
-                               + " <p>Form provides customizable editor for classes implementing"
+                               + " fields with selections is given."
+                               + " <br /><br />Form provides customizable editor for classes implementing"
                                + " Item-interface. Also the form itself"
                                + " implements this interface for easier connectivity to other items."
                                + " To use the form as editor for an item, just connect the item to"
@@ -175,9 +175,9 @@ public class FeatureForm extends Feature implements
                                + " be added. If you need to connect a class that does not implement"
                                + " Item-interface, most properties of any"
                                + " class following bean pattern, can be accessed trough"
-                               + " BeanItem.</p>"
-                               + " <p>The best example of Form usage is the this feature browser itself; "
-                               + " all the Property-panels in demos are composed of Form-components.</p>";
+                               + " BeanItem."
+                               + " <br /><br />The best example of Form usage is the this feature browser itself; "
+                               + " all the Property-panels in demos are composed of Form-components.";
        }
 
        protected String getTitle() {
index fa60495edb17a1018c6f5a6f4452bb4aad93ea67..51e430f08429f150693e44c2f7ac69f1ea844607 100644 (file)
@@ -70,7 +70,7 @@ public class FeatureFrameWindow extends Feature implements Button.ClickListener
                                "None", "Minimal" });
 
                propertyPanel.addProperties("FrameWindow Properties", ap);
-               
+
                setJavadocURL("ui/FrameWindow.html");
 
                return l;
index 134de073f81ff4c9704b67387f897c9d4b960ca3..99926dba4ee51f243b84f0d7faff63bb4825adf2 100644 (file)
@@ -59,7 +59,7 @@ public class FeatureGridLayout extends Feature {
                propertyPanel.addProperties("GridLayout Features", ap);
                propertyPanel.getField("height").dependsOn(
                                propertyPanel.getField("add component"));
-               
+
                setJavadocURL("ui/GridLayout.html");
 
                return l;
@@ -77,10 +77,10 @@ public class FeatureGridLayout extends Feature {
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "<p>This feature provides a container that lays out components "
-                               + "into a grid of given width and height.</p>"
-                               + "<p>On the demo tab you can try out how the different "
-                               + "properties affect the presentation of the component.</p>";
+               return "This feature provides a container that lays out components "
+                               + "into a grid of given width and height."
+                               + "<br /><br />On the demo tab you can try out how the different "
+                               + "properties affect the presentation of the component.";
        }
 
        protected String getImage() {
index 208fccd2d97c53ac7e494dff4ef7b9e1912dd8dc..0ee458debc25085ba8afc648949eac6dfdc754ca 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class FeatureItems extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Item is an object, which contains a set of named "
+                       + "properties. Each property is identified by an "
+                       + "id and a reference to the property can be queried from the Item. "
+                       + "Item defines inner-interfaces for maintaining the item property "
+                       + "set and listening the item property set changes."
+                       + "<br /><br />Items generally represent objects in the object-oriented "
+                       + "model, but with the exception that they are configurable "
+                       + "and provide an event mechanism. The simplest way of utilizing "
+                       + "Item interface is to use existing Item implementations. "
+                       + "Provided utility classes include configurable property set,"
+                       + " bean to item adapter and Form UI component.";
+
        public FeatureItems() {
                super();
        }
-       
+
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Items");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
-               
-               setJavadocURL("data/Items.html");
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("data/Item.html");
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "<p>Item is an object, which contains a set of named "
-                               + "properties. Each property is identified by an "
-                               + "id and a reference to the property can be queried from the Item. "
-                               + "Item defines inner-interfaces for maintaining the item property "
-                               + "set and listening the item property set changes.</p>"
-                               + "<p>Items generally represent objects in the object-oriented "
-                               + "model, but with the exception that they are configurable "
-                               + "and provide an event mechanism. The simplest way of utilizing "
-                               + "Item interface is to use existing Item implementations. "
-                               + "Provided utility classes include configurable property set,"
-                               + " bean to item adapter and Form UI component.</p>";
+               return null;
        }
 
        protected String getImage() {
index 88e5448ec2a2e0905a06f6ce034992113416ef31..cac095c6f634f70e73c5868ea9fb4ddba2c575d9 100644 (file)
@@ -59,7 +59,7 @@ public class FeatureLabel extends Feature {
                propertyPanel.addProperties("Label Properties", ap);
 
                setJavadocURL("ui/Label.html");
-               
+
                return l;
        }
 
index b1b3a52b7a50044f2ff609b84efb6f4d3f4011f1..372a7cb2309d139765b009b4305399fb0ec90db2 100644 (file)
@@ -40,7 +40,7 @@ public class FeatureLink extends Feature {
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
-               
+
                Link lnk = new Link("Link caption", new ExternalResource(
                                "http://www.itmill.com"));
                l.addComponent(lnk);
@@ -57,12 +57,12 @@ public class FeatureLink extends Feature {
                propertyPanel.addProperties("Link Properties", ap);
 
                setJavadocURL("ui/Link.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "Link lnk = new Link(\"Link caption\",new ExternalResource(\"http://www.itmill.com\"));\n";
+               return "Link link = new Link(\"Link caption\",new ExternalResource(\"http://www.itmill.com\"));\n";
        }
 
        protected String getDescriptionXHTML() {
index 3b006e5e8682693a0ec12235a9680ac63ff4c20d..a432e3a27b80bf626a2cc49e4ff48fc82f9352f3 100644 (file)
@@ -59,7 +59,7 @@ public class FeatureOrderedLayout extends Feature {
                propertyPanel.addProperties("OrderedLayout Properties", ap);
 
                setJavadocURL("ui/OrderedLayout.html");
-               
+
                return l;
        }
 
@@ -77,9 +77,9 @@ public class FeatureOrderedLayout extends Feature {
                return "This feature provides a container for laying out components either "
                                + "vertically, horizontally or flowingly. The orientation may be changed "
                                + "during runtime. It also defines a special style for themes to implement called \"form\""
-                               + "that is used for input forms where the components are layed-out side-by-side "
+                               + "that is used for input forms where the components are laid-out side-by-side "
                                + "with their captions."
-                               + "<br/><br/>"
+                               + "<br /><br />"
                                + "On the demo tab you can try out how the different properties "
                                + "affect the presentation of the component.";
        }
index 199203be02eb6571a55f8c56ba5450a5f507370c..f65829dcdb42edbec2b9d49760e3eaf96c139901 100644 (file)
@@ -42,7 +42,9 @@ public class FeaturePanel extends Feature {
 
                // Example panel
                Panel show = new Panel("Panel caption");
-               show.addComponent(new Label("Label in Panel"));
+               show
+                               .addComponent(new Label(
+                                               "This is an example Label component that is added into Panel."));
                l.addComponent(show);
 
                // Properties
@@ -57,23 +59,21 @@ public class FeaturePanel extends Feature {
                propertyPanel.addProperties("Panel Properties", ap);
 
                setJavadocURL("ui/Panel.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
                return "Panel show = new Panel(\"Panel caption\");\n"
-                               + "show.addComponent(new Label(\"Label in Panel\"));";
+                               + "show.addComponent(new Label(\"This is an example Label component that is added into Panel.\"));";
 
        }
 
        protected String getDescriptionXHTML() {
-               return "The Panel is a container for other components, it usually draws a frame around it's "
-                               + "extremities and may have a caption to clarify the nature of the contained components purpose."
-                               + "A panel always contains firstly a layout onto which the actual contained components are added, "
-                               + "this layout may be switched on the fly. <br/><br/>"
-                               + "On the demo tab you can try out how the different properties "
-                               + "affect the presentation of the component.";
+               return "Panel is a container for other components, by default it draws a frame around it's "
+                               + "extremities and may have a caption to clarify the nature of the contained components' purpose."
+                               + " Panel contains an layout where the actual contained components are added, "
+                               + "this layout may be switched on the fly.";
        }
 
        protected String getImage() {
index 253c20356f18929c690f53b31e345832d6630058..4d6b01337848757eddc22932423d2cccceefc306 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class FeatureProperties extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "IT Mill Toolkit data model is one of the core concepts "
+                       + "in the library and Property-interface is the base of that "
+                       + "model. Property provides standardized API for a single data object "
+                       + "that can be read (get) and written (set). A property is always typed, but can optionally "
+                       + "support data type conversions. Optionally properties can provide "
+                       + "value change events for following the state changes."
+                       + "<br /><br />The most important function of the Property as well as other "
+                       + "data models is to connect classes implementing the interface directly to "
+                       + "editor and viewer classes. Typically this is used to connect different "
+                       + "data sources to UI components for editing and viewing their contents."
+                       + "<br /><br />Properties can be utilized either by implementing the interface "
+                       + "or by using some of the existing property implementations. IT Mill Toolkit "
+                       + "includes Property interface implementations for "
+                       + "arbitrary function pairs or Bean-properties as well as simple object "
+                       + "properties."
+                       + "<br /><br />Many of the UI components also implement Property interface and allow "
+                       + "setting of other components as their data-source. These UI-components "
+                       + "include TextField, DateField, Select, Table, Button, "
+                       + "Label and Tree.";
+
        public FeatureProperties() {
                super();
        }
-       
+
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Data Model");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
-               
-               setJavadocURL("ui/package-summary.html");
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("data/Property.html");
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>IT Mill Toolkti data model is one of the core concepts "
-                               + "in the library and Property-interface is the base of that "
-                               + "model. Property provides standardized API for a singe data object "
-                               + "that can be getted and setted. A property is always typed, but can optionally "
-                               + "support data type conversions. Optionally properties can provide "
-                               + "value change events for following the state changes.</p>"
-                               + "<p>The most important function of the Property as well as other "
-                               + "data models is to connect classes implementing the interface directly to "
-                               + "editor and viewer classes. Typically this is used to connect different "
-                               + "data sources to UI components for editing and viewing their contents.</p>"
-                               + "<p>Properties can be utilized either by implementing the interface "
-                               + "or by using some of the existing property implementations. IT Mill Toolkit "
-                               + "includes Property interface implementations for "
-                               + "arbitrary function pairs or Bean-properties as well as simple object "
-                               + "properties.</p>"
-                               + "<p>Many of the UI components also imlement Property interface and allow "
-                               + "setting of other components as their data-source. These UI-components "
-                               + "include TextField, DateField, Select, Table, Button, "
-                               + "Label and Tree.</p>";
+               return null;
        }
 
-
        protected String getImage() {
-               return "properties.jpg";
+               return null;
        }
 
        protected String getTitle() {
-               return "Introduction of Data Model Properties";
+               return null;
        }
 
 }
index 53d883797a72459ec5c33d0a13a98c1e1b5a6ecd..f0f95ff909e04fb8d40065270e6db42b01716046 100644 (file)
@@ -65,7 +65,7 @@ public class FeatureSelect extends Feature {
                                themes.getItemCaptionPropertyId()).setValue("optiongroup");
                themes.addItem("twincol").getItemProperty(
                                themes.getItemCaptionPropertyId()).setValue("twincol");
-               
+
                setJavadocURL("ui/Select.html");
 
                return l;
index 19bf0399bed3957c82878d62a69da3769e4ba56c..524e4be03aa4c20cc68ba85b881c8bacba3c326a 100644 (file)
@@ -41,24 +41,36 @@ public class FeatureTabSheet extends Feature {
                OrderedLayout l = new OrderedLayout();
 
                TabSheet ts = new TabSheet();
-               ts.addTab(new Label("Tab 1 Body"), "Tab 1 caption", null);
-               ts.addTab(new Label("Tab 2 Body"), "Tab 2 caption", null);
-               ts.addTab(new Label("Tab 3 Body"), "Tab 3 caption", null);
+               ts
+                               .addTab(
+                                               new Label(
+                                                               "This is an example Label component that is added into Tab 1."),
+                                               "Tab 1 caption", null);
+               ts
+                               .addTab(
+                                               new Label(
+                                                               "This is an example Label component that is added into Tab 2."),
+                                               "Tab 2 caption", null);
+               ts
+                               .addTab(
+                                               new Label(
+                                                               "This is an example Label component that is added into Tab 3."),
+                                               "Tab 3 caption", null);
                l.addComponent(ts);
 
                // Properties
                propertyPanel = new PropertyPanel(ts);
-               
+
                setJavadocURL("ui/TabSheet.html");
 
                return l;
        }
 
        protected String getExampleSrc() {
-               return "TabSheet ts = new TabSheet();"
-                               + "ts.addTab(new Label(\"Tab 1 Body\"),\"Tab 1 caption\",null);"
-                               + "ts.addTab(new Label(\"Tab 2 Body\"),\"Tab 2 caption\",null);"
-                               + "ts.addTab(new Label(\"Tab 3 Body\"),\"Tab 3 caption\",null);";
+               return "TabSheet ts = new TabSheet();\n"
+                               + "ts.addTab(new Label(\"This is an example Label component that is added into Tab 1.\"),\"Tab 1 caption\",null);\n"
+                               + "ts.addTab(new Label(\"This is an example Label component that is added into Tab 2.\"),\"Tab 2 caption\",null);\n"
+                               + "ts.addTab(new Label(\"This is an example Label component that is added into Tab 3.\"),\"Tab 3 caption\",null);";
        }
 
        protected String getDescriptionXHTML() {
index 43b5de61bbe81d861cb549efe7f9b55d3a366690..e2cbd2f92226f07a8ef130c9294437a1e5309351 100644 (file)
@@ -124,13 +124,14 @@ public class FeatureTable extends Feature implements Action.Handler {
                                new Integer(Table.ROW_HEADER_MODE_PROPERTY) }, new Object[] {
                                "Explicit", "Explicit defaults ID", "Hidden", "Icon only",
                                "ID", "Index", "Item", "Property" });
-               /* Disabled theme changer before #356, #357 are fixed
-               Select themes = (Select) propertyPanel.getField("style");
-               themes.addItem("list").getItemProperty(
-                               themes.getItemCaptionPropertyId()).setValue("list");
-               themes.addItem("paging").getItemProperty(
-                               themes.getItemCaptionPropertyId()).setValue("paging");
-                               */
+               /*
+                * Disabled theme changer before #356, #357 are fixed Select themes =
+                * (Select) propertyPanel.getField("style");
+                * themes.addItem("list").getItemProperty(
+                * themes.getItemCaptionPropertyId()).setValue("list");
+                * themes.addItem("paging").getItemProperty(
+                * themes.getItemCaptionPropertyId()).setValue("paging");
+                */
                propertyPanel.addProperties("Table Properties", ap);
 
                t.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
@@ -140,7 +141,7 @@ public class FeatureTable extends Feature implements Action.Handler {
                t.setSelectable(true);
 
                setJavadocURL("ui/Table.html");
-               
+
                return l;
        }
 
@@ -167,16 +168,16 @@ public class FeatureTable extends Feature implements Action.Handler {
 
        protected String getDescriptionXHTML() {
 
-               return "<p>The Table component is designed for displaying large volumes of tabular data, "
-                               + "in multiple pages whenever needed.</p> "
-                               + "<p>Selection of the displayed data is supported both in selecting exclusively one row "
+               return "The Table component is designed for displaying large volumes of tabular data, "
+                               + "in multiple pages whenever needed."
+                               + "<br /><br />Selection of the displayed data is supported both in selecting exclusively one row "
                                + "or multiple rows at the same time. For each row, there may be a set of actions associated, "
                                + "depending on the theme these actions may be displayed either as a drop-down "
-                               + "menu for each row or a set of command buttons.</p><p>"
-                               + "Table may be connected to any datasource implementing the <code>Container</code> interface."
+                               + "menu for each row or a set of command buttons."
+                               + "<br /><br />Table may be connected to any datasource implementing the <code>Container</code> interface."
                                + "This way data found in external datasources can be directly presented in the table component."
-                               + "</p><p>"
-                               + "Table implements a number of features and you can test most of them in the table demo tab.</p>";
+                               + "<br /><br />"
+                               + "Table implements a number of features and you can test most of them in the table demo tab.";
        }
 
        protected String getImage() {
index 0485b9d8fa109a2d266016b08d1bc85a197690bd..342dda1f7794e25ae289e40dac2474c97c925e81 100644 (file)
@@ -51,9 +51,9 @@ public class FeatureTextField extends Feature {
                                "rows", "wordwrap", "writeThrough", "readThrough",
                                "nullRepresentation", "nullSettingAllowed", "secret" });
                propertyPanel.addProperties("Text field properties", f);
-               
+
                setJavadocURL("ui/TextField.html");
-               
+
                return l;
        }
 
@@ -66,17 +66,16 @@ public class FeatureTextField extends Feature {
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "<p>TextField combines the logic of both the single line text-entry field and the multi-line "
+               return "TextField combines the logic of both the single line text-entry field and the multi-line "
                                + "text-area into one component. "
                                + "As with all Data-components of IT Mill Toolkit, the TextField can also be bound to an "
                                + "underlying data source, both directly or in a buffered (asynchronous) "
                                + "mode. In buffered mode its background color will change to indicate "
-                               + "that the value has changed but is not committed.</p>"
-                               + "<p>Furthermore a validators may be bound to the component to "
-                               + "check and validate the given input before it is actually commited."
-                               + "</p>"
-                               + "<p>On the demo tab you can try out how the different properties affect the "
-                               + "presentation of the component.</p>";
+                               + "that the value has changed but is not committed."
+                               + "<br /><br />Furthermore a validators may be bound to the component to "
+                               + "check and validate the given input before it is actually committed."
+                               + "<br /><br />On the demo tab you can try out how the different properties affect the "
+                               + "presentation of the component.";
        }
 
        protected String getImage() {
index fa82a6852b225bedcfbbab472965410c8b23dfea..88217494443eefca76da6565eedd7dab4a1cc714 100644 (file)
@@ -100,7 +100,7 @@ public class FeatureTree extends Feature implements Action.Handler {
                for (int i = 0; i < 100; i++)
                        if (!t.hasChildren(names[i]))
                                t.setChildrenAllowed(names[i], false);
-               
+
                l.addComponent(t);
 
                // Actions
@@ -118,9 +118,9 @@ public class FeatureTree extends Feature implements Action.Handler {
                themes.addItem("menu").getItemProperty(
                                themes.getItemCaptionPropertyId()).setValue("menu");
                propertyPanel.addProperties("Tree Properties", ap);
-               
+
                setJavadocURL("ui/Tree.html");
-               
+
                return l;
        }
 
@@ -140,21 +140,21 @@ public class FeatureTree extends Feature implements Action.Handler {
        }
 
        protected String getDescriptionXHTML() {
-               return "<p>A tree is a natural way to represent datasets that have"
+               return "A tree is a natural way to represent datasets that have"
                                + " hierarchical relationships, such as filesystems, message "
-                               + "threads or... family trees. IT Mill Toolkit features a versatile "
+                               + "threads or, as in this example, family trees. IT Mill Toolkit features a versatile "
                                + "and powerful Tree component that works much like the tree components "
-                               + "of most modern operating systems. </p>"
-                               + "<p>The most prominent use of the Tree component is to "
+                               + "of most modern operating systems."
+                               + "<br /><br />The most prominent use of the Tree component is to "
                                + "use it for displaying a hierachical menu, like the "
                                + "menu on the left side of the screen for instance "
-                               + "or to display filesystems or other hierarchical datasets.</p>"
-                               + "<p>The tree component uses <code>Container</code> "
+                               + "or to display filesystems or other hierarchical datasets."
+                               + "<br /><br />The tree component uses <code>Container</code> "
                                + "datasources much like the Table component, "
                                + "with the addition that it also utilizes the hierarchy "
-                               + "information maintained by the container. </p><p>On "
-                               + "the demo tab you can try out how the different properties "
-                               + "affect the presentation of the tree component.</p>";
+                               + "information maintained by the container."
+                               + "<br /><br />On the demo tab you can try out how the different properties "
+                               + "affect the presentation of the tree component.";
        }
 
        protected String getImage() {
index e4d90ecd0130bb94ff0ec3fbbd43fd2a7d7154e3..452df31c77b6f91ab9aabaa75b3e033551f0af51 100644 (file)
@@ -65,7 +65,7 @@ public class FeatureUpload extends Feature implements Upload.FinishedListener {
 
                // Properties
                propertyPanel = new PropertyPanel(up);
-               
+
                setJavadocURL("ui/Upload.html");
 
                return l;
@@ -84,8 +84,7 @@ public class FeatureUpload extends Feature implements Upload.FinishedListener {
        protected String getDescriptionXHTML() {
                return "This demonstrates the use of the Upload component together with the Link component. "
                                + "This implementation does not actually store the file to disk, it only keeps it in a buffer. "
-                               + "The example given on the example-tab on the other hand stores the file to disk and binds the link to that file.<br/>"
-                               + "<br/>On the demo tab you can try out how the different properties affect the presentation of the component.";
+                               + "The example given on the <em>Code Sample</em>-tab on the other hand stores the file to disk and binds the link to that file.";
        }
 
        protected String getImage() {
index ce469c0e9c175bcf37c0dd8862ec1e9bca8c3ce6..f04bd4b99822cc2f6826108f98478677cfc13f12 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class FeatureValidators extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "IT Mill Toolkit contains simple, yet powerful validation interface, "
+                       + "that consists of two parts: Validator and Validatable. Validator is "
+                       + "any class that can check validity of an Object. Validatable is "
+                       + "a class with configurable validation. "
+                       + "Validation errors are passed as special exceptions that implement "
+                       + "ErrorMessage interface. This way the validation errors can be "
+                       + "automatically added to components."
+                       + "<br /><br />Utilities for simple string and null validation are provided, as "
+                       + "well as combinative validators. The validation interface can also "
+                       + "be easily implemented by the applications for more complex "
+                       + "validation needs.";
+
        public FeatureValidators() {
                super();
        }
-       
+
        protected Component getDemoComponent() {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Validators");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
                setJavadocURL("data/Validator.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "<p>IT Mill Toolkit contains simple, yet powerful validation interface, "
-                               + "that consists of two parts: Validator and Validatable. Validator is "
-                               + "any class that can check validity of an Object. Validatable is "
-                               + "a class with configurable validation. "
-                               + "Validation errors are passed as special exceptions that implement "
-                               + "ErrorMessage interface. This way the validation errors can be "
-                               + "automatically added to components.</p>"
-                               + "<p>Utilities for simple string and null validation are provided, as "
-                               + "well as combinative validators. The validation interface can also "
-                               + "be easily implemented by the applications for more complex "
-                               + "validation needs.</p>";
+               return null;
        }
 
        protected String getImage() {
-               return "validators.gif";
+               return null;
        }
 
        protected String getTitle() {
-               return "Introduction of Data Model Validators";
+               return null;
        }
 
 }
index 32fd71d5299ca590bf9b65993fdfbd992c38c5e1..db96a7dba4b1cae5195e7ec23b7af2188bf8d038 100644 (file)
@@ -45,14 +45,21 @@ public class FeatureWindow extends Feature {
 
        protected Component getDemoComponent() {
 
-               OrderedLayout l = new OrderedLayout();
+               OrderedLayout layoutRoot = new OrderedLayout();
+               OrderedLayout layoutUpper = new OrderedLayout();
+               OrderedLayout layoutLower = new OrderedLayout();
                demoWindow = new Window("Feature Test Window");
 
-               l.addComponent(addButton);
-               l.addComponent(removeButton);
+               layoutUpper.addComponent(addButton);
+               layoutUpper.addComponent(removeButton);
+
+               layoutLower.addComponent(new Label(
+                               "Note: depending on your browser, you may have to "
+                                               + "allow popups from this web site in order"
+                                               + " to get this demo to work."));
                updateWinStatus();
 
-               // Properties
+               // Propertiesc
                propertyPanel = new PropertyPanel(demoWindow);
                propertyPanel.dependsOn(addButton);
                propertyPanel.dependsOn(removeButton);
@@ -65,10 +72,12 @@ public class FeatureWindow extends Feature {
                                new Integer(Window.BORDER_MINIMAL) }, new Object[] { "Default",
                                "None", "Minimal" });
                propertyPanel.addProperties("Window Properties", windowProperties);
-               
+
                setJavadocURL("ui/Window.html");
-               
-               return l;
+
+               layoutRoot.addComponent(layoutUpper);
+               layoutRoot.addComponent(layoutLower);
+               return layoutRoot;
        }
 
        protected String getExampleSrc() {
@@ -95,6 +104,28 @@ public class FeatureWindow extends Feature {
 
        public void addWin() {
                getApplication().addWindow(demoWindow);
+
+               demoWindow.removeAllComponents();
+               demoWindow.setWidth(500);
+               demoWindow.setHeight(200);
+
+               // Panel panel = new Panel("New window");
+               // panel.addComponent(new Label(
+               // "This is a new window created by selecting <em>Add to "
+               // + "application</em>.<br /><br />You can close"
+               // + " this window by selecting <em>Remove from"
+               // + " application</em> from the Feature Browser window.",
+               // Label.CONTENT_XHTML));
+               // demoWindow.addComponent(panel);
+
+               demoWindow
+                               .addComponent(new Label(
+                                               "<br /><br />This is a new window created by <em>Add to "
+                                                               + "application</em> button's event.<br /><br />You may simply"
+                                                               + " close this window or select <em>Remove from"
+                                                               + " application</em> from the Feature Browser window.",
+                                               Label.CONTENT_XHTML));
+
                windowProperties.getField("name").setReadOnly(true);
                updateWinStatus();
        }
index 5501a7c96841d275b1ed59741367f4b8c40a7baa..48afd990cad56d6e66502b322587e2559fbd2e6b 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroBasic extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Text Field, Date Field, Button, Form, Label and Link components are provided as samples"
+                       + " for basic UI components."
+                       + "<br /><br />See the API documentation of respective components for more information.";
+
        public IntroBasic() {
                super();
        }
@@ -42,27 +50,41 @@ public class IntroBasic extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
-               
+               Panel panel = new Panel();
+               panel.setCaption("Basic UI components");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
+
                // Properties
-               propertyPanel = null;
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
 
                setJavadocURL("ui/package-summary.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return null;
        }
 
        protected String getImage() {
index 966c5f818cee275a5b19fcd0c493fffc8016d9a1..2907f46b7031a7d42026570fa33078d0c952e980 100644 (file)
 
 package com.itmill.toolkit.demo.features;
 
+import com.itmill.toolkit.terminal.ClassResource;
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Embedded;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroComponents extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "This picture summarizes the relations between different user interface (UI) components."
+                       + "<br /><br />See API documentation below for more information.";
+
        public IntroComponents() {
                super();
        }
@@ -42,35 +51,52 @@ public class IntroComponents extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("UI component diagram");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
+
+               panel.addComponent(new Embedded("", new ClassResource("components.png",
+                               this.getApplication())));
 
                // Properties
-               propertyPanel = null;
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
                setJavadocURL("ui/package-summary.html");
-               
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return null;
        }
 
        protected String getImage() {
-               return "components.png";
+               return null;
        }
 
        protected String getTitle() {
-               return "Introduction of basic components (TODO)";
+               return null;
        }
 
 }
index 1079505becb9a3092d6f08a931b65998792bcff2..c2c954381f553e9feb20c8201e48e8950f404a48 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroDataHandling extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Embedded Objects and Upload components are provided as samples"
+                       + " for data handling section."
+                       + "<br /><br />See the API documentation of respective components for more information.";
+
        public IntroDataHandling() {
                super();
        }
@@ -42,25 +50,40 @@ public class IntroDataHandling extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Data Handling");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
 
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return "Please select <em>Embedded Objects</em> or <em>Upload</em>"
+                               + " from the menu for more information.";
        }
 
        protected String getImage() {
@@ -68,7 +91,7 @@ public class IntroDataHandling extends Feature {
        }
 
        protected String getTitle() {
-               return "Introduction for data handling (TODO)";
+               return null;
        }
 
 }
index 35c640da3052837af102ad7058e539fea7bddcb9..5a0a677d73b3d291466e42a93369419eff45c7ba 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroDataModel extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "This section introduces main concepts of data model in IT Mill Toolkit."
+                       + " It contains brief introduction to Properties, Items, Containers, Validators and"
+                       + " Buffering classes."
+                       + "<br /><br />See the API documentation of respective area for more information.";
+
        public IntroDataModel() {
                super();
        }
@@ -42,25 +51,41 @@ public class IntroDataModel extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Data Model");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("data/package-summary.html");
 
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return null;
        }
 
        protected String getImage() {
@@ -68,7 +93,7 @@ public class IntroDataModel extends Feature {
        }
 
        protected String getTitle() {
-               return "Introduction for data model (TODO)";
+               return null;
        }
 
 }
index d7d811f0bb2e9c29cb856c679f9d8d3dc1ee50c0..1ee36bde359bf04d3abc36943e67aed431e94cfb 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroItemContainers extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Select, Table and Tree components are provided as samples"
+                       + " for item containers section."
+                       + "<br /><br />See the API documentation of respective components for more information.";
+
        public IntroItemContainers() {
                super();
        }
@@ -42,25 +50,41 @@ public class IntroItemContainers extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Item Containers");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("data/Container.html");
 
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return null;
        }
 
        protected String getImage() {
@@ -68,7 +92,7 @@ public class IntroItemContainers extends Feature {
        }
 
        protected String getTitle() {
-               return "Introduction for item containers (TODO)";
+               return null;
        }
 
 }
index 724916f3ee2e2a0e72064b883241015c0a9efb92..d68aa720b4475a3a67e3dee1ba050a6046ec72c8 100644 (file)
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroLayouts extends Feature {
 
+       private static final String INTRO_TEXT = ""
+                       + "Layouts are required to place components to specific place in the UI."
+                       + " You can use plain Java to accomplish sophisticated component layouting."
+                       + " Other option is to use Custom Layout and let the web page designers"
+                       + " to take responsibility of component layouting using their own set of tools."
+                       + "<br /><br />See API documentation below for more information.";
+
        public IntroLayouts() {
                super();
        }
@@ -42,25 +52,41 @@ public class IntroLayouts extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Layouts");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(INTRO_TEXT);
 
                // Properties
-               propertyPanel = null;
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
+               setJavadocURL("ui/Layout.html");
 
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return "";
+               return null;
        }
 
        protected String getImage() {
@@ -68,7 +94,7 @@ public class IntroLayouts extends Feature {
        }
 
        protected String getTitle() {
-               return "Introduction for layouts (TODO)";
+               return null;
        }
 
 }
index be5603d284faa16073db8d4b75a2f24273b91435..eb7d1f18088922689d631e4ac3ff4b3a72b81634 100644 (file)
@@ -53,7 +53,7 @@ public class IntroTerminal extends Feature {
        }
 
        protected String getExampleSrc() {
-               return "";
+               return null;
        }
 
        /**
index 94277e5f58b1c4ba0add3468cda96b2ae30bd2e8..3f2fa826d8322700ae9c4c4faa58784c8c6c2037 100644 (file)
 
 package com.itmill.toolkit.demo.features;
 
-import com.itmill.toolkit.terminal.web.ApplicationServlet;
 import com.itmill.toolkit.ui.Component;
+import com.itmill.toolkit.ui.Form;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.OrderedLayout;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.Select;
 
 public class IntroWelcome extends Feature {
 
-       private static final String WELCOME_TEXT = ""
-                       + "In this application you may view and play with some features of IT Mill Toolkit.<br/>"
-                       + "Most of the features can be tested online and include simple example of their "
-                       + "usage associated with it.<br/><br/>"
-                       + "Start your tour by selecting features from the list on the left.<br/><br/>"
-                       + "For more information, point your browser to: <a href=\"http://www.itmill.com\""
-                       + " target=\"_new\">www.itmill.com</a>";
+       private static final String WELCOME_TEXT_UPPER = ""
+                       + "This application lets you view and play with some features of "
+                       + "IT Mill Toolkit. Use menu on the left to select component."
+                       + "<br /><br />Note the <b>Properties selection</b> on the top "
+                       + "right corner. Click it open to access component properties and"
+                       + " feel free to edit properties at any time."
+                       + "<br /><br />The area that you are now reading is the component"
+                       + " demo area. Lower area from here contains component description, API"
+                       + " documentation and optional code sample. Note that not all selections"
+                       + " contain demo, only description and API documentation is shown."
+                       + "<br /><br />You may also change application's theme from below the menu."
+                       + " This example application is designed to work best with"
+                       + " <em>Demo</em> theme, other themes are for demonstration purposes only."
+                       + "<br /><br />IT Mill Toolkit enables you to construct complex Web"
+                       + " applications using plain Java, no knowledge of other Web technologies"
+                       + " such as XML, HTML, DOM, JavaScript or browser differences is required."
+                       + "<br /><br />For more information, point your browser to"
+                       + " <a href=\"http://www.itmill.com\" target=\"_new\">www.itmill.com</a>.";
+
+       private static final String WELCOME_TEXT_LOWER = ""
+                       + "This area contains the selected component's description, API documentation"
+                       + " and optional code sample."
+                       + "<br /><br />To see how simple it is to create IT Mill Toolkit application,"
+                       + " click <em>Code Sample</em> tab."
+                       + "<br /><br />Start your tour now by selecting features from the list"
+                       + " on the left and remember to experiment with the <b>Properties panel</b>"
+                       + " located at the top right corner area.";
 
        public IntroWelcome() {
                super();
@@ -51,30 +73,52 @@ public class IntroWelcome extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               Label lab = new Label();
-               lab.setStyle("featurebrowser-none");
-               Label version = new Label();
-               version.setValue("IT Mill Toolkit version: "+ApplicationServlet.VERSION);
-               l.addComponent(version);
-               l.addComponent(lab);
+               Panel panel = new Panel();
+               panel.setCaption("Welcome to the IT Mill Toolkit feature tour!");
+               l.addComponent(panel);
+
+               Label label = new Label();
+               panel.addComponent(label);
+
+               label.setContentMode(Label.CONTENT_XHTML);
+               label.setValue(WELCOME_TEXT_UPPER);
 
                // Properties
-               propertyPanel = null;
-               
+               propertyPanel = new PropertyPanel(panel);
+               Form ap = propertyPanel.createBeanPropertySet(new String[] { "width",
+                               "height" });
+               Select themes = (Select) propertyPanel.getField("style");
+               themes.addItem("light").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("light");
+               themes.addItem("strong").getItemProperty(
+                               themes.getItemCaptionPropertyId()).setValue("strong");
+               propertyPanel.addProperties("Panel Properties", ap);
+
                setJavadocURL("package-summary.html");
-       
+
+               setPropsReminder(false);
+
                return l;
        }
 
        protected String getExampleSrc() {
-               return "";
+               return ""
+                               + "// Hello World example application\n\n"
+                               + "package com.itmill.toolkit.demo;\n"
+                               + "import com.itmill.toolkit.ui.*;\n"
+                               + "public class HelloWorld extends com.itmill.toolkit.Application {\n"
+                               + "    public void init() {\n"
+                               + "        Window main = new Window(\"Hello window\");\n"
+                               + "        setMainWindow(main);\n"
+                               + "        main.addComponent(new Label(\"Hello World!\"));\n"
+                               + "    }\n" + "}\n";
        }
 
        /**
         * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
         */
        protected String getDescriptionXHTML() {
-               return WELCOME_TEXT;
+               return WELCOME_TEXT_LOWER;
        }
 
        protected String getImage() {
@@ -82,7 +126,7 @@ public class IntroWelcome extends Feature {
        }
 
        protected String getTitle() {
-               return "Welcome to the IT Mill Toolkit feature tour! (TODO)";
+               return null;
        }
 
 }
diff --git a/src/com/itmill/toolkit/demo/features/buffering.jpg b/src/com/itmill/toolkit/demo/features/buffering.jpg
deleted file mode 100644 (file)
index 23f1e89..0000000
Binary files a/src/com/itmill/toolkit/demo/features/buffering.jpg and /dev/null differ
diff --git a/src/com/itmill/toolkit/demo/features/containers.jpg b/src/com/itmill/toolkit/demo/features/containers.jpg
deleted file mode 100644 (file)
index 863e134..0000000
Binary files a/src/com/itmill/toolkit/demo/features/containers.jpg and /dev/null differ
diff --git a/src/com/itmill/toolkit/demo/features/customlayout.jpg b/src/com/itmill/toolkit/demo/features/customlayout.jpg
deleted file mode 100644 (file)
index b668b3c..0000000
Binary files a/src/com/itmill/toolkit/demo/features/customlayout.jpg and /dev/null differ
diff --git a/src/com/itmill/toolkit/demo/features/properties.jpg b/src/com/itmill/toolkit/demo/features/properties.jpg
deleted file mode 100644 (file)
index 3c2ef43..0000000
Binary files a/src/com/itmill/toolkit/demo/features/properties.jpg and /dev/null differ
diff --git a/src/com/itmill/toolkit/demo/features/validators.gif b/src/com/itmill/toolkit/demo/features/validators.gif
deleted file mode 100644 (file)
index 55faff1..0000000
Binary files a/src/com/itmill/toolkit/demo/features/validators.gif and /dev/null differ