From 0dee5602cacb46e1120bc2339464c89bea34ddaa Mon Sep 17 00:00:00 2001 From: Marko Gronroos Date: Thu, 11 Feb 2016 19:48:45 +0200 Subject: Fixed critically broken comment blocks, broken emphasis and escaping, and some other formatting, and moved book preface, chapter structure, and index to the docs repository. Change-Id: If9299da4415f3181d59b8384e5ac96f940bd5229 --- .../components/components-features.asciidoc | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'documentation/components/components-features.asciidoc') diff --git a/documentation/components/components-features.asciidoc b/documentation/components/components-features.asciidoc index 9374b93bc1..fd4e748c05 100644 --- a/documentation/components/components-features.asciidoc +++ b/documentation/components/components-features.asciidoc @@ -168,7 +168,7 @@ Components are always enabled by default. You can disable a component with Button enabled = new Button("Enabled"); enabled.setEnabled(true); // The default layout.addComponent(enabled); - + Button disabled = new Button("Disabled"); disabled.setEnabled(false); layout.addComponent(disabled); @@ -242,7 +242,7 @@ image is provided as a resource, perhaps most typically a TextField name = new TextField("Name"); name.setIcon(new ThemeResource("icons/user.png")); layout.addComponent(name); - + // Component with an icon from another theme ('runo') Button ok = new Button("OK"); ok.setIcon(new ThemeResource("../runo/icons/16/ok.png")); @@ -297,11 +297,11 @@ You can set the locale of a component (or the application) with ---- // Component for which the locale is meaningful InlineDateField date = new InlineDateField("Datum"); - + // German language specified with ISO 639-1 language -// code and ISO 3166-1 alpha-2 country code. +// code and ISO 3166-1 alpha-2 country code. date.setLocale(new Locale("de", "DE")); - + date.setResolution(Resolution.DAY); layout.addComponent(date); ---- @@ -357,7 +357,7 @@ get the localized resource right when the component is created. ResourceBundle bundle = ResourceBundle.getBundle(MyAppCaptions.class.getName(), UI.getCurrent().getLocale()); - + // Get a localized resource from the bundle Button cancel = new Button(bundle.getString(MyAppCaptions.CancelKey)); @@ -381,10 +381,10 @@ in Java. // The locale in which we want to have the language // selection list Locale displayLocale = Locale.ENGLISH; - + // All known locales final Locale[] locales = Locale.getAvailableLocales(); - + // Allow selecting a language. We are in a constructor of a // CustomComponent, so preselecting the current // language of the application can not be done before @@ -401,7 +401,7 @@ for (int i=0; i