From ab72d71d3e4a9547f2dd7bdd07e6b8da91a4e4e4 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Fri, 13 Feb 2009 10:50:32 +0000 Subject: [PATCH] Sampler sample descriptions update. svn changeset:6829/svn branch:trunk --- .../toolkit/demo/sampler/FeatureSet.java | 65 +++++++++++-------- .../accordions/AccordionDisabled.java | 5 +- .../features/accordions/AccordionIcons.java | 5 +- .../sampler/features/buttons/ButtonLink.java | 10 ++- .../sampler/features/buttons/ButtonPush.java | 4 +- .../features/buttons/ButtonSwitch.java | 5 +- .../demo/sampler/features/commons/Errors.java | 10 +-- .../demo/sampler/features/commons/Icons.java | 2 +- .../sampler/features/commons/Tooltips.java | 9 +-- .../features/commons/TooltipsExample.java | 26 ++++---- .../sampler/features/dates/DateLocale.java | 2 +- .../features/dates/DateResolution.java | 2 +- .../demo/sampler/features/form/FormBasic.java | 5 +- .../demo/sampler/features/form/FormPojo.java | 2 +- .../features/link/LinkCurrentWindow.java | 2 +- .../features/link/LinkNoDecorations.java | 2 +- .../features/link/LinkSizedWindow.java | 2 +- .../NotificationCustomExample.java | 3 +- .../notifications/NotificationError.java | 2 +- .../notifications/NotificationHumanized.java | 8 +-- .../notifications/NotificationTray.java | 2 +- .../notifications/NotificationWarning.java | 2 +- .../sampler/features/panels/PanelLight.java | 2 +- .../sampler/features/table/TableActions.java | 2 +- .../features/tabsheets/TabSheetDisabled.java | 4 +- .../features/tabsheets/TabSheetIcons.java | 6 +- .../features/tabsheets/TabSheetScrolling.java | 4 +- .../demo/sampler/features/text/LabelRich.java | 3 +- .../features/text/LabelRichExample.java | 8 +-- .../sampler/features/text/RichTextEditor.java | 7 +- .../demo/sampler/features/text/TextArea.java | 14 ++-- .../features/trees/TreeMouseEvents.java | 4 +- .../features/trees/TreeMultiSelect.java | 2 +- 33 files changed, 114 insertions(+), 117 deletions(-) diff --git a/src/com/itmill/toolkit/demo/sampler/FeatureSet.java b/src/com/itmill/toolkit/demo/sampler/FeatureSet.java index c573d19efa..f344e94acb 100644 --- a/src/com/itmill/toolkit/demo/sampler/FeatureSet.java +++ b/src/com/itmill/toolkit/demo/sampler/FeatureSet.java @@ -145,13 +145,17 @@ public class FeatureSet extends Feature { */ public static class Buttons extends FeatureSet { public Buttons() { - super("Buttons", new Feature[] { - // - new ButtonPush(), // basic - new ButtonLink(), // link - new ButtonSwitch(), // switch/checkbox + super( + "Buttons", + "Buttons", + "A button is one of the fundamental building blocks of any application.", + new Feature[] { + // + new ButtonPush(), // basic + new ButtonLink(), // link + new ButtonSwitch(), // switch/checkbox - }); + }); } } @@ -160,7 +164,7 @@ public class FeatureSet extends Feature { super( "Links", "Links", - "An external link - this is the basic HTML-style link, changing the url of the browser w/o triggering a server-side event (like the link-styled Button).
By default, links open in the current browser window. Links can open new browser windows, and configure the amount of browser features shown, such as toolbar and addressbar.", + "An external link. This is the basic HTML-style link, changing the url of the browser w/o triggering a server-side event (like the link-styled Button).", new Feature[] { // new LinkCurrentWindow(), // basic @@ -237,22 +241,32 @@ public class FeatureSet extends Feature { public static class Tabsheets extends FeatureSet { public Tabsheets() { - super("Tabsheets", new Feature[] { - // - new TabSheetIcons(), // - new TabSheetScrolling(), // - new TabSheetDisabled(), // - }); + super( + "Tabsheets", + "Tabsheets", + "A Tabsheet organizes multiple components so that only the one component associated with the currently selected 'tab' is shown. Typically a tab will contain a Layout, which in turn may contain many components.", + new Feature[] { + // + new TabSheetIcons(), // + new TabSheetScrolling(), // + new TabSheetDisabled(), // + }); } } public static class Accordions extends FeatureSet { public Accordions() { - super("Accordions", new Feature[] { - // - new AccordionIcons(), // - new AccordionDisabled(), // - }); + super( + "Accordions", + "Accordions", + "An accordion component is a specialized case of a tabsheet." + + " Within an accordion, the tabs are organized vertically," + + " and the content will be shown directly below the tab.", + new Feature[] { + // + new AccordionIcons(), // + new AccordionDisabled(), // + }); } } @@ -272,14 +286,9 @@ public class FeatureSet extends Feature { public static class Forms extends FeatureSet { public Forms() { - super( - "Forms", - "Forms", + super("Forms", "Forms", "The Form -component provides a convenient way to organize" - + " related fields visually.

It is most useful when connected" - + " to a data source, and provides buffering and customization" - + " features to support that scenario.", - new Feature[] { + + " related fields visually.", new Feature[] { // new FormBasic(), // new FormPojo(), // @@ -307,7 +316,7 @@ public class FeatureSet extends Feature { super( "Table (Grid)", "Table (Grid)", - "Also known as a (Data)Grid, Table can be used to show data in a tabular fashion. It's well suited for showing large datasets.", + "A Table, also known as a (Data)Grid, can be used to show data in a tabular fashion. It's well suited for showing large datasets.", new Feature[] { // new TableHeaderIcons(), // @@ -331,7 +340,7 @@ public class FeatureSet extends Feature { super( "Texts", "Texts", - "A label is a simple component that allows you to add optionally formatted text components to your application.", + "A label is a simple component that allows you to add (optionally formatted) text components to your application.", new Feature[] { // new LabelPlain(), // @@ -362,7 +371,7 @@ public class FeatureSet extends Feature { super( "Trees", "Trees", - "The Tree component allows a natural way to represent data that has hierarchical relationships, such as filesystems or message threads.", + "The Tree component provides a natural way to represent data that has hierarchical relationships, such as filesystems or message threads.", new Feature[] { // new TreeSingleSelect(), // diff --git a/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionDisabled.java b/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionDisabled.java index 2841f07d03..494cb16927 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionDisabled.java +++ b/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionDisabled.java @@ -14,10 +14,7 @@ public class AccordionDisabled extends Feature { @Override public String getDescription() { - return "An accordion component is a specialized case of a" - + " tabsheet, with vertically organized tabs." - + " With an accordion component you can also disable, enable," - + " hide and show tabs, similar to a tabsheet."; + return "You can disable, enable, hide and show accordion 'tabs'."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionIcons.java b/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionIcons.java index b63f0cc56d..f5a5e2cad4 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionIcons.java +++ b/src/com/itmill/toolkit/demo/sampler/features/accordions/AccordionIcons.java @@ -14,10 +14,7 @@ public class AccordionIcons extends Feature { @Override public String getDescription() { - return "An accordion component is a specialized case of a" - + " tabsheet. Within an accordion, the tabs are organized" - + " vertically, and the content will be shown directly" - + " below the tab."; + return "The accordion 'tabs' can contain icons in addition to the caption."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonLink.java b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonLink.java index 9e78fbe375..899ba3083c 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonLink.java +++ b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonLink.java @@ -6,8 +6,6 @@ import com.itmill.toolkit.demo.sampler.FeatureSet; import com.itmill.toolkit.demo.sampler.NamedExternalResource; import com.itmill.toolkit.demo.sampler.features.blueprints.ProminentPrimaryAction; import com.itmill.toolkit.demo.sampler.features.link.LinkCurrentWindow; -import com.itmill.toolkit.demo.sampler.features.link.LinkNoDecorations; -import com.itmill.toolkit.demo.sampler.features.link.LinkSizedWindow; import com.itmill.toolkit.ui.Button; public class ButtonLink extends Feature { @@ -19,8 +17,9 @@ public class ButtonLink extends Feature { @Override public String getDescription() { - return "A link-styled button; works like a Button but looks like a Link.
" - + "I.e it does not actually link somewhere, but triggers a server-side event, just like a regular button."; + return "A link-styled button works like a push button, but looks like" + + " a Link.
It does not actually link somewhere, but" + + " triggers a server-side event, just like a regular button."; } @Override @@ -31,8 +30,7 @@ public class ButtonLink extends Feature { @Override public Class[] getRelatedFeatures() { return new Class[] { ButtonPush.class, ButtonSwitch.class, - LinkCurrentWindow.class, LinkNoDecorations.class, - LinkSizedWindow.class, ProminentPrimaryAction.class, + LinkCurrentWindow.class, ProminentPrimaryAction.class, FeatureSet.Links.class }; } diff --git a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonPush.java b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonPush.java index 19915db726..305f06e6d7 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonPush.java +++ b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonPush.java @@ -15,7 +15,9 @@ public class ButtonPush extends Feature { @Override public String getDescription() { - return "A basic push-button."; + return "A push-button, which can be considered a 'regular' button," + + " returns to it's 'unclicked' state after emitting an event" + + " when the user clicks it."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonSwitch.java b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonSwitch.java index 6101151f74..f9c578f69a 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonSwitch.java +++ b/src/com/itmill/toolkit/demo/sampler/features/buttons/ButtonSwitch.java @@ -14,7 +14,10 @@ public class ButtonSwitch extends Feature { @Override public String getDescription() { - return "A switch button works like a regular button, triggering a server-side event, but it's state is 'sticky' - it toggles on or off, instead of popping right back out.
Also know as a CheckBox."; + return "A switch button works like a regular push button, triggering" + + " a server-side event, but it's state is 'sticky': the button" + + " toggles between it's on and off states, instead of popping" + + " right back out.
Also know as a CheckBox."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/commons/Errors.java b/src/com/itmill/toolkit/demo/sampler/features/commons/Errors.java index 6589c70c4a..10f12f1295 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/commons/Errors.java +++ b/src/com/itmill/toolkit/demo/sampler/features/commons/Errors.java @@ -3,9 +3,9 @@ package com.itmill.toolkit.demo.sampler.features.commons; import com.itmill.toolkit.demo.sampler.APIResource; import com.itmill.toolkit.demo.sampler.Feature; import com.itmill.toolkit.demo.sampler.NamedExternalResource; +import com.itmill.toolkit.demo.sampler.features.form.FormBasic; import com.itmill.toolkit.demo.sampler.features.notifications.NotificationError; -import com.itmill.toolkit.ui.Component; -import com.itmill.toolkit.ui.Window; +import com.itmill.toolkit.ui.AbstractComponent; public class Errors extends Feature { @@ -35,13 +35,13 @@ public class Errors extends Feature { } public APIResource[] getRelatedAPI() { - return new APIResource[] { new APIResource(Component.class), - new APIResource(Window.Notification.class) }; + return new APIResource[] { new APIResource(AbstractComponent.class) }; } public Class[] getRelatedFeatures() { // TODO link validation sample, form sample - return new Class[] { NotificationError.class }; + return new Class[] { Validation.class, FormBasic.class, + NotificationError.class }; } public NamedExternalResource[] getRelatedResources() { diff --git a/src/com/itmill/toolkit/demo/sampler/features/commons/Icons.java b/src/com/itmill/toolkit/demo/sampler/features/commons/Icons.java index 057ebf9608..3db63efe6c 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/commons/Icons.java +++ b/src/com/itmill/toolkit/demo/sampler/features/commons/Icons.java @@ -42,7 +42,7 @@ public class Icons extends Feature { @Override public Class[] getRelatedFeatures() { - // TODO Auto-generated method stub + // TODO link embedded sample return null; } diff --git a/src/com/itmill/toolkit/demo/sampler/features/commons/Tooltips.java b/src/com/itmill/toolkit/demo/sampler/features/commons/Tooltips.java index 20a5d9d8d6..ea74cebab0 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/commons/Tooltips.java +++ b/src/com/itmill/toolkit/demo/sampler/features/commons/Tooltips.java @@ -15,12 +15,9 @@ public class Tooltips extends Feature { @Override public String getDescription() { return "Most components can have a description," - + " which is shown as a \"tooltip\".
" - + "Descriptions may have rich content.
" - + "Note that description is more generic term than" - + " tooltip - a component might choose to show" - + " the description in another way, if that's more appropriate" - + " for that component.)"; + + " which is shown as a \"tooltip\"." + + " Descriptions may have formatted ('rich') content.
" + + ""; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java b/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java index a2fa9c95c1..dabad8b7a8 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java +++ b/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java @@ -34,20 +34,18 @@ public class TooltipsExample extends VerticalLayout { .setValue("Click Edit my tooltip to edit this tooltip, then Apply"); rte.setVisible(false); // hide editor initially addComponent(rte); - Button apply = new Button("Edit my tooltip", - new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - if (rte.isVisible()) { - rte.setVisible(false); - event.getButton().setDescription( - (String) rte.getValue()); - event.getButton().setCaption("Edit my tooltip"); - } else { - rte.setVisible(true); - event.getButton().setCaption("Apply"); - } - } - }); + Button apply = new Button("Edit tooltip", new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + if (rte.isVisible()) { + rte.setVisible(false); + event.getButton().setDescription((String) rte.getValue()); + event.getButton().setCaption("Edit tooltip"); + } else { + rte.setVisible(true); + event.getButton().setCaption("Apply"); + } + } + }); apply.setDescription((String) rte.getValue()); addComponent(apply); diff --git a/src/com/itmill/toolkit/demo/sampler/features/dates/DateLocale.java b/src/com/itmill/toolkit/demo/sampler/features/dates/DateLocale.java index dd28ccf311..c859fa83e3 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/dates/DateLocale.java +++ b/src/com/itmill/toolkit/demo/sampler/features/dates/DateLocale.java @@ -18,7 +18,7 @@ public class DateLocale extends Feature { public String getDescription() { return "In this example, you can select a different locale" + " from the combo box and see how the calendar component" - + " will be localized."; + + " is localized."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/dates/DateResolution.java b/src/com/itmill/toolkit/demo/sampler/features/dates/DateResolution.java index 4f170cf38d..479b4e9595 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/dates/DateResolution.java +++ b/src/com/itmill/toolkit/demo/sampler/features/dates/DateResolution.java @@ -16,7 +16,7 @@ public class DateResolution extends Feature { public String getDescription() { return "In this example, you can select a different resolution" + " from the combo box and see how the calendar component" - + " will change."; + + " changes."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/form/FormBasic.java b/src/com/itmill/toolkit/demo/sampler/features/form/FormBasic.java index f34f7a7339..8b02dd7c45 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/form/FormBasic.java +++ b/src/com/itmill/toolkit/demo/sampler/features/form/FormBasic.java @@ -25,7 +25,10 @@ public class FormBasic extends Feature { @Override public String getDescription() { - return ""; + return "A Form is most useful when connected to a data source, and" + + " provides buffering and customization features to support" + + " that scenario.
Enter something and try discarding" + + " or applying."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/form/FormPojo.java b/src/com/itmill/toolkit/demo/sampler/features/form/FormPojo.java index 020ae63615..1e80239949 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/form/FormPojo.java +++ b/src/com/itmill/toolkit/demo/sampler/features/form/FormPojo.java @@ -25,7 +25,7 @@ public class FormPojo extends Feature { @Override public String getDescription() { - return "It can easily be used as a POJO or Bean editor by wrapping the" + return "A Form can easily be used as a POJO or Bean editor by wrapping the" + " bean using BeanItem. The basic functionality only requires" + " a couple of lines of code, then Validators and other" + " customizations can be applied to taste."; diff --git a/src/com/itmill/toolkit/demo/sampler/features/link/LinkCurrentWindow.java b/src/com/itmill/toolkit/demo/sampler/features/link/LinkCurrentWindow.java index 56092e4214..602265f8e9 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/link/LinkCurrentWindow.java +++ b/src/com/itmill/toolkit/demo/sampler/features/link/LinkCurrentWindow.java @@ -15,7 +15,7 @@ public class LinkCurrentWindow extends Feature { @Override public String getDescription() { - return ""; + return "By default, links open in the current browser window (use the browser back-button to get back)."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/link/LinkNoDecorations.java b/src/com/itmill/toolkit/demo/sampler/features/link/LinkNoDecorations.java index 65e19ecf09..a2f7ecefc5 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/link/LinkNoDecorations.java +++ b/src/com/itmill/toolkit/demo/sampler/features/link/LinkNoDecorations.java @@ -15,7 +15,7 @@ public class LinkNoDecorations extends Feature { @Override public String getDescription() { - return "These links open a browser window without decorations."; + return "Links can open new browser windows, and configure the amount of browser features shown, such as toolbar and addressbar.
These links open a browser window without decorations."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/link/LinkSizedWindow.java b/src/com/itmill/toolkit/demo/sampler/features/link/LinkSizedWindow.java index 18f118e0f7..97ee0a0ac9 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/link/LinkSizedWindow.java +++ b/src/com/itmill/toolkit/demo/sampler/features/link/LinkSizedWindow.java @@ -15,7 +15,7 @@ public class LinkSizedWindow extends Feature { @Override public String getDescription() { - return "These links open a small, prefixed size window without decorations."; + return "Links can configure the size of the opened window.
These links open a small fixed size window without decorations."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java index cd1f224137..7a77b4a2da 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java +++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java @@ -21,13 +21,14 @@ public class NotificationCustomExample extends VerticalLayout { setSpacing(true); setWidth(null); // layout will grow with content - final TextField caption = new TextField("Caption"); + final TextField caption = new TextField("Caption", "Message sent"); caption .setDescription("Main info; a short caption-only notification is often most effective."); caption.setWidth("200px"); addComponent(caption); final RichTextArea description = new RichTextArea(); + description.setValue("

to john.doe@example.com

"); description.setCaption("Description"); description .setDescription("Additional information; try to keep it short."); diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationError.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationError.java index b653f70665..3cb6793894 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationError.java +++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationError.java @@ -14,7 +14,7 @@ public class NotificationError extends Feature { @Override public String getDescription() { - return "

The Error variant is modal, and is to be used for" + return "

The Error notification is modal, and is to be used for" + " messages that must be seen by the user.
" + " The Error message must be closed by clicking" + " the notification.

Candidates for an" diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanized.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanized.java index 137e5808db..4b68f5383a 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanized.java +++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanized.java @@ -14,13 +14,13 @@ public class NotificationHumanized extends Feature { @Override public String getDescription() { - return "

The Humanized variant is an implementation of" - + " the transparent message -pattern, and is meant" + return "

The Humanized notification is an implementation of" + + " the transparent message -pattern, and can be used" + " to indicate non-critical events while interrupting" + " the user as little as possible.
" + "The Humanized message quickly fades away once" - + " the user interacts with the application (e.g. moves" - + " mouse, types)

Candidates for a" + + " the user interacts with the application (i.e. moves" + + " mouse, types).

Candidates for a" + " Humanized notification include 'XYZ saved'," + " 'Added XYZ', and other messages that the user can" + " safely ignore, once the application is familliar.

"; diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTray.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTray.java index f5a41312fd..8c5451ba3c 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTray.java +++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTray.java @@ -14,7 +14,7 @@ public class NotificationTray extends Feature { @Override public String getDescription() { - return "

The Tray variant shows up in the lower left corner," + return "

The Tray notification shows up in the lower right corner," + " and is meant to interrupt the user as little as possible" + " even if it's shown for a while. " + "The Tray message fades away after a few moments" diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarning.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarning.java index 316bbbd7c5..0db7cf9631 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarning.java +++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarning.java @@ -14,7 +14,7 @@ public class NotificationWarning extends Feature { @Override public String getDescription() { - return "

The Warning variant is an implementation of" + return "

The Warning notification is an implementation of" + " the transparent message -pattern, and is meant" + " to interrupt the user as little as possible, while" + " still drawing the needed attention." diff --git a/src/com/itmill/toolkit/demo/sampler/features/panels/PanelLight.java b/src/com/itmill/toolkit/demo/sampler/features/panels/PanelLight.java index d7d4717058..024e9abfb7 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/panels/PanelLight.java +++ b/src/com/itmill/toolkit/demo/sampler/features/panels/PanelLight.java @@ -15,7 +15,7 @@ public class PanelLight extends Feature { @Override public String getDescription() { - return "The 'light' style version has less decorations than the regular Panel style."; + return "The 'light' panel has less decorations than the regular Panel style."; } diff --git a/src/com/itmill/toolkit/demo/sampler/features/table/TableActions.java b/src/com/itmill/toolkit/demo/sampler/features/table/TableActions.java index 979deb3d7e..ecec28aa50 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/table/TableActions.java +++ b/src/com/itmill/toolkit/demo/sampler/features/table/TableActions.java @@ -21,7 +21,7 @@ public class TableActions extends Feature { @Override public String getDescription() { - return "Actions can be added to each row, and are show in the a" + return "Actions can be added to each row, and are show in a" + " context menu when right-clicking."; } diff --git a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetDisabled.java b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetDisabled.java index 5822c8e14f..dc15ee2c0b 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetDisabled.java +++ b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetDisabled.java @@ -13,9 +13,7 @@ public class TabSheetDisabled extends Feature { @Override public String getDescription() { - return "With a tabsheet component you also have the" - + " ability to enable and disable as well as" - + " show and hide specific tabs."; + return "Individual tabs can be enabled, disabled, hidden or visible."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetIcons.java b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetIcons.java index 5713fdcc23..80a32fed59 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetIcons.java +++ b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetIcons.java @@ -13,11 +13,7 @@ public class TabSheetIcons extends Feature { @Override public String getDescription() { - return "A tabsheet component with icons. Each tab can" - + " contain any component. In this simple example" - + " each tab contains a label." - + "
You can also attach a listener to the tab" - + " change event."; + return "Each tab can have an Icon in addition to the caption."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetScrolling.java b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetScrolling.java index d0f01e9582..018c2eaf83 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetScrolling.java +++ b/src/com/itmill/toolkit/demo/sampler/features/tabsheets/TabSheetScrolling.java @@ -13,9 +13,7 @@ public class TabSheetScrolling extends Feature { @Override public String getDescription() { - return "A tabsheet component with too many tabs to display" - + " within the width of the tabsheet. A scrolling" - + "feature will be added to the tab bar automatically."; + return "If the tabs are to many to be shown at once, a scrolling control will appear automatically."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/text/LabelRich.java b/src/com/itmill/toolkit/demo/sampler/features/text/LabelRich.java index 80353d63ec..203d0064ac 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/text/LabelRich.java +++ b/src/com/itmill/toolkit/demo/sampler/features/text/LabelRich.java @@ -15,7 +15,8 @@ public class LabelRich extends Feature { public String getDescription() { return "In this example the content mode is set to" + " CONTENT_XHTML. This content mode assumes that the" - + " content set to the label will be valid XHTML."; + + " content set to the label will be valid XHTML.
" + + "Click the Edit button to edit the label content."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/text/LabelRichExample.java b/src/com/itmill/toolkit/demo/sampler/features/text/LabelRichExample.java index 191247f81b..d7e2551e04 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/text/LabelRichExample.java +++ b/src/com/itmill/toolkit/demo/sampler/features/text/LabelRichExample.java @@ -18,10 +18,10 @@ public class LabelRichExample extends VerticalLayout implements ClickListener { setSpacing(true); setSizeUndefined(); // let layout grow with content - richText = new Label("

Rich text label example

" - + "

In this example, the content mode is set to " - + "CONTENT_XHTML.

" - + "

This text can be edited with the Edit-button

"); + richText = new Label( + "

Rich text example

" + + "

The quick brown fox jumps over the lazy dog.

" + + "

This text can be edited with the Edit -button

"); richText.setContentMode(Label.CONTENT_XHTML); addComponent(richText); diff --git a/src/com/itmill/toolkit/demo/sampler/features/text/RichTextEditor.java b/src/com/itmill/toolkit/demo/sampler/features/text/RichTextEditor.java index 8878584034..62eed31858 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/text/RichTextEditor.java +++ b/src/com/itmill/toolkit/demo/sampler/features/text/RichTextEditor.java @@ -14,10 +14,9 @@ public class RichTextEditor extends Feature { @Override public String getDescription() { - return "A RichTextArea component allows editing XHTML" - + " content.
Click the edit button to open the" - + " editor and the show button to show the edited" - + " result as an XHTML label."; + return "The RichTextArea allows 'rich' formatting of the input.
" + + "Click the Edit button to edit the label content" + + " with the RichTextArea."; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/text/TextArea.java b/src/com/itmill/toolkit/demo/sampler/features/text/TextArea.java index 474a8620e4..4982e8de5f 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/text/TextArea.java +++ b/src/com/itmill/toolkit/demo/sampler/features/text/TextArea.java @@ -2,19 +2,19 @@ package com.itmill.toolkit.demo.sampler.features.text; import com.itmill.toolkit.demo.sampler.APIResource; import com.itmill.toolkit.demo.sampler.Feature; +import com.itmill.toolkit.demo.sampler.FeatureSet; import com.itmill.toolkit.demo.sampler.NamedExternalResource; -import com.itmill.toolkit.ui.Label; +import com.itmill.toolkit.ui.TextField; public class TextArea extends Feature { @Override public String getName() { - return "Textarea"; + return "Text area"; } @Override public String getDescription() { - return "A multi-line Textfield component allows you to input" - + " several lines of text." + return "A text field can be configured to allow multiple lines of input." + "
The amount of columns and lines can be set, and both are set here to" + " 20 characters. Note that this only affects the width and height of the" + " component, not the allowed length of input."; @@ -22,13 +22,13 @@ public class TextArea extends Feature { @Override public APIResource[] getRelatedAPI() { - return new APIResource[] { new APIResource(Label.class) }; + return new APIResource[] { new APIResource(TextField.class) }; } @Override public Class[] getRelatedFeatures() { - return new Class[] { LabelPlain.class, LabelPreformatted.class, - RichTextEditor.class }; + return new Class[] { RichTextEditor.class, TextFieldSingle.class, + FeatureSet.Texts.class }; } @Override diff --git a/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMouseEvents.java b/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMouseEvents.java index 2a7d4e4728..220cbea4d6 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMouseEvents.java +++ b/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMouseEvents.java @@ -15,10 +15,10 @@ public class TreeMouseEvents extends Feature { public String getDescription() { return "In this example, selecting items from the tree" + " is disabled. Instead, another method of selection" - + " is used. Through ItemClickEvent we can update the" + + " is used. Using the ItemClickEvent, we can update the" + " label showing the selection." + "
Try to click your left, right and middle mouse" - + "buttons on the tree items. Any modifier keys will" + + " buttons on the tree items. Any modifier keys will" + " also be detected."; } diff --git a/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMultiSelect.java b/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMultiSelect.java index cab5cce026..47ea3cff25 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMultiSelect.java +++ b/src/com/itmill/toolkit/demo/sampler/features/trees/TreeMultiSelect.java @@ -14,7 +14,7 @@ public class TreeMultiSelect extends Feature { @Override public String getDescription() { return "In this example, you can select multiple tree nodes" - + " and delete your selection. Click a selected item again to de-select it."; + + " and delete the selected items. Click a selected item again to de-select it."; } @Override -- 2.39.5