aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJani Laakso <jani.laakso@itmill.com>2007-02-12 00:33:32 +0000
committerJani Laakso <jani.laakso@itmill.com>2007-02-12 00:33:32 +0000
commit44083ece0d88dbb23e0a7f38ee91fe0a7285fe9f (patch)
tree3a10c29b4efa0455db15d9634e3030c4fce7cdd5 /src
parent042b77b476da0616509160538be8c5e20ed1c010 (diff)
downloadvaadin-framework-44083ece0d88dbb23e0a7f38ee91fe0a7285fe9f.tar.gz
vaadin-framework-44083ece0d88dbb23e0a7f38ee91fe0a7285fe9f.zip
Many language fixes.
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
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/demo/features/Feature.java55
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureBrowser.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureBuffering.java114
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureButton.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureContainers.java83
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java81
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureDateField.java36
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureEmbedded.java71
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureForm.java16
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureGridLayout.java10
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureItems.java60
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureLabel.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureLink.java6
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java6
-rw-r--r--src/com/itmill/toolkit/demo/features/FeaturePanel.java18
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureProperties.java81
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureSelect.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTabSheet.java28
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTable.java31
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTextField.java17
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTree.java24
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureUpload.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureValidators.java62
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureWindow.java45
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroBasic.java38
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroComponents.java46
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroDataHandling.java37
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroDataModel.java39
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroItemContainers.java38
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroLayouts.java40
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroTerminal.java2
-rw-r--r--src/com/itmill/toolkit/demo/features/IntroWelcome.java84
-rw-r--r--src/com/itmill/toolkit/demo/features/buffering.jpgbin11833 -> 0 bytes
-rw-r--r--src/com/itmill/toolkit/demo/features/containers.jpgbin12327 -> 0 bytes
-rw-r--r--src/com/itmill/toolkit/demo/features/customlayout.jpgbin7127 -> 0 bytes
-rw-r--r--src/com/itmill/toolkit/demo/features/properties.jpgbin8877 -> 0 bytes
-rw-r--r--src/com/itmill/toolkit/demo/features/validators.gifbin28209 -> 0 bytes
38 files changed, 774 insertions, 409 deletions
diff --git a/src/com/itmill/toolkit/demo/features/Feature.java b/src/com/itmill/toolkit/demo/features/Feature.java
index c59eeb30ab..7d20da755a 100644
--- a/src/com/itmill/toolkit/demo/features/Feature.java
+++ b/src/com/itmill/toolkit/demo/features/Feature.java
@@ -28,12 +28,20 @@
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
diff --git a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
index 41e8979ce7..8d63a162d0 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
@@ -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
diff --git a/src/com/itmill/toolkit/demo/features/FeatureBuffering.java b/src/com/itmill/toolkit/demo/features/FeatureBuffering.java
index 3071c3a3d6..da345e5a5a 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureBuffering.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureBuffering.java
@@ -1,92 +1,110 @@
/* *************************************************************************
- 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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureButton.java b/src/com/itmill/toolkit/demo/features/FeatureButton.java
index 364e759b6e..502a4d9272 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureButton.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureButton.java
@@ -53,7 +53,7 @@ public class FeatureButton extends Feature {
propertyPanel.addProperties("Button Properties", ap);
setJavadocURL("ui/Button.html");
-
+
return l;
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureContainers.java b/src/com/itmill/toolkit/demo/features/FeatureContainers.java
index 94d093ae56..5b3f5fe134 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureContainers.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureContainers.java
@@ -29,66 +29,85 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java b/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
index a9900e4b63..b491f406d7 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
@@ -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";
}
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureDateField.java b/src/com/itmill/toolkit/demo/features/FeatureDateField.java
index 24c9b46afb..570b2c370b 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureDateField.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureDateField.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureEmbedded.java b/src/com/itmill/toolkit/demo/features/FeatureEmbedded.java
index e152e38ed8..e63792f2cd 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureEmbedded.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureEmbedded.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureForm.java b/src/com/itmill/toolkit/demo/features/FeatureForm.java
index 4e0fda7c85..488b9e9fcb 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureForm.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureForm.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java b/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
index fa60495edb..51e430f084 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
@@ -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;
diff --git a/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java b/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
index 134de073f8..99926dba4e 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureItems.java b/src/com/itmill/toolkit/demo/features/FeatureItems.java
index 208fccd2d9..0ee458debc 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureItems.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureItems.java
@@ -29,50 +29,70 @@
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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureLabel.java b/src/com/itmill/toolkit/demo/features/FeatureLabel.java
index 88e5448ec2..cac095c6f6 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureLabel.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureLabel.java
@@ -59,7 +59,7 @@ public class FeatureLabel extends Feature {
propertyPanel.addProperties("Label Properties", ap);
setJavadocURL("ui/Label.html");
-
+
return l;
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureLink.java b/src/com/itmill/toolkit/demo/features/FeatureLink.java
index b1b3a52b7a..372a7cb230 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureLink.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureLink.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java b/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
index 3b006e5e86..a432e3a27b 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
@@ -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.";
}
diff --git a/src/com/itmill/toolkit/demo/features/FeaturePanel.java b/src/com/itmill/toolkit/demo/features/FeaturePanel.java
index 199203be02..f65829dcdb 100644
--- a/src/com/itmill/toolkit/demo/features/FeaturePanel.java
+++ b/src/com/itmill/toolkit/demo/features/FeaturePanel.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureProperties.java b/src/com/itmill/toolkit/demo/features/FeatureProperties.java
index 253c20356f..4d6b013378 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureProperties.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureProperties.java
@@ -29,64 +29,83 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureSelect.java b/src/com/itmill/toolkit/demo/features/FeatureSelect.java
index 53d883797a..f0f95ff909 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureSelect.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureSelect.java
@@ -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;
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java b/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
index 19bf0399be..524e4be03a 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTable.java b/src/com/itmill/toolkit/demo/features/FeatureTable.java
index 43b5de61bb..e2cbd2f922 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTable.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTable.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTextField.java b/src/com/itmill/toolkit/demo/features/FeatureTextField.java
index 0485b9d8fa..342dda1f77 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTextField.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTextField.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTree.java b/src/com/itmill/toolkit/demo/features/FeatureTree.java
index fa82a6852b..8821749444 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTree.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTree.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureUpload.java b/src/com/itmill/toolkit/demo/features/FeatureUpload.java
index e4d90ecd01..452df31c77 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureUpload.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureUpload.java
@@ -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() {
diff --git a/src/com/itmill/toolkit/demo/features/FeatureValidators.java b/src/com/itmill/toolkit/demo/features/FeatureValidators.java
index ce469c0e9c..f04bd4b998 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureValidators.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureValidators.java
@@ -29,58 +29,78 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/FeatureWindow.java b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
index 32fd71d529..db96a7dba4 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureWindow.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
@@ -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();
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroBasic.java b/src/com/itmill/toolkit/demo/features/IntroBasic.java
index 5501a7c968..48afd990ca 100644
--- a/src/com/itmill/toolkit/demo/features/IntroBasic.java
+++ b/src/com/itmill/toolkit/demo/features/IntroBasic.java
@@ -29,11 +29,19 @@
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() {
diff --git a/src/com/itmill/toolkit/demo/features/IntroComponents.java b/src/com/itmill/toolkit/demo/features/IntroComponents.java
index 966c5f818c..2907f46b70 100644
--- a/src/com/itmill/toolkit/demo/features/IntroComponents.java
+++ b/src/com/itmill/toolkit/demo/features/IntroComponents.java
@@ -28,12 +28,21 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroDataHandling.java b/src/com/itmill/toolkit/demo/features/IntroDataHandling.java
index 1079505bec..c2c954381f 100644
--- a/src/com/itmill/toolkit/demo/features/IntroDataHandling.java
+++ b/src/com/itmill/toolkit/demo/features/IntroDataHandling.java
@@ -29,11 +29,19 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroDataModel.java b/src/com/itmill/toolkit/demo/features/IntroDataModel.java
index 35c640da30..5a0a677d73 100644
--- a/src/com/itmill/toolkit/demo/features/IntroDataModel.java
+++ b/src/com/itmill/toolkit/demo/features/IntroDataModel.java
@@ -29,11 +29,20 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroItemContainers.java b/src/com/itmill/toolkit/demo/features/IntroItemContainers.java
index d7d811f0bb..1ee36bde35 100644
--- a/src/com/itmill/toolkit/demo/features/IntroItemContainers.java
+++ b/src/com/itmill/toolkit/demo/features/IntroItemContainers.java
@@ -29,11 +29,19 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroLayouts.java b/src/com/itmill/toolkit/demo/features/IntroLayouts.java
index 724916f3ee..d68aa720b4 100644
--- a/src/com/itmill/toolkit/demo/features/IntroLayouts.java
+++ b/src/com/itmill/toolkit/demo/features/IntroLayouts.java
@@ -29,11 +29,21 @@
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;
}
}
diff --git a/src/com/itmill/toolkit/demo/features/IntroTerminal.java b/src/com/itmill/toolkit/demo/features/IntroTerminal.java
index be5603d284..eb7d1f1808 100644
--- a/src/com/itmill/toolkit/demo/features/IntroTerminal.java
+++ b/src/com/itmill/toolkit/demo/features/IntroTerminal.java
@@ -53,7 +53,7 @@ public class IntroTerminal extends Feature {
}
protected String getExampleSrc() {
- return "";
+ return null;
}
/**
diff --git a/src/com/itmill/toolkit/demo/features/IntroWelcome.java b/src/com/itmill/toolkit/demo/features/IntroWelcome.java
index 94277e5f58..3f2fa826d8 100644
--- a/src/com/itmill/toolkit/demo/features/IntroWelcome.java
+++ b/src/com/itmill/toolkit/demo/features/IntroWelcome.java
@@ -28,20 +28,42 @@
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
index 23f1e89f29..0000000000
--- a/src/com/itmill/toolkit/demo/features/buffering.jpg
+++ /dev/null
Binary files 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
index 863e1342b1..0000000000
--- a/src/com/itmill/toolkit/demo/features/containers.jpg
+++ /dev/null
Binary files 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
index b668b3c27d..0000000000
--- a/src/com/itmill/toolkit/demo/features/customlayout.jpg
+++ /dev/null
Binary files 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
index 3c2ef430f2..0000000000
--- a/src/com/itmill/toolkit/demo/features/properties.jpg
+++ /dev/null
Binary files 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
index 55faff1796..0000000000
--- a/src/com/itmill/toolkit/demo/features/validators.gif
+++ /dev/null
Binary files differ