summaryrefslogtreecommitdiffstats
path: root/documentation/components/components-label.asciidoc
diff options
context:
space:
mode:
authorMarko Gronroos <magi@vaadin.com>2016-05-20 14:44:42 +0300
committerMarko Grönroos <magi@vaadin.com>2016-06-30 11:13:20 +0000
commit93767cf76b2fb14c65b758066c67fc8b48cc2eeb (patch)
tree958ddb8c45271e9a505280ef750ae07ebeda170f /documentation/components/components-label.asciidoc
parentedad7348bb8eba807225bfa72d4b0a4342426c71 (diff)
downloadvaadin-framework-93767cf76b2fb14c65b758066c67fc8b48cc2eeb.tar.gz
vaadin-framework-93767cf76b2fb14c65b758066c67fc8b48cc2eeb.zip
Scaled images for print edition and fixed errors up to the beginning of layouts chapter (#19835). Also major revision of Tree, CustomField, and layouts overview.
Change-Id: I19f5e9511b83f953ce4707f324d81c2821ebb69d
Diffstat (limited to 'documentation/components/components-label.asciidoc')
-rw-r--r--documentation/components/components-label.asciidoc16
1 files changed, 5 insertions, 11 deletions
diff --git a/documentation/components/components-label.asciidoc b/documentation/components/components-label.asciidoc
index 4545d40924..424e5ae76c 100644
--- a/documentation/components/components-label.asciidoc
+++ b/documentation/components/components-label.asciidoc
@@ -21,7 +21,6 @@ You can give the label text most conviniently in the constructor, as is done in
the following. Label has 100% default width, so the containing layout must also
have defined width.
-
[source, java]
----
// A container that is 100% wide by default
@@ -36,13 +35,12 @@ See the http://demo.vaadin.com/book-examples-vaadin7/book#component.label.basic[
accessing the text value, so you can get and set the text with
[methodname]#getValue()# and [methodname]#setValue()#.
-
[source, java]
----
// Get the label's text to initialize a field
TextField editor = new TextField(null, // No caption
label.getValue());
-
+
// Change the label's text
editor.addValueChangeListener(event -> // Java 8
label.setValue(editor.getValue()));
@@ -91,7 +89,7 @@ width of [classname]#Label# is the default 100%, the text in the
[[figure.components.label]]
.The Label Component
-image::img/label-example1.png[]
+image::img/label-example1.png[width=50%, scaledwidth=75%]
Setting [classname]#Label# to undefined width will cause it to not wrap at the
end of the line, as the width of the content defines the width. If placed inside
@@ -162,7 +160,7 @@ Label textLabel = new Label(
Label preLabel = new Label(
"Preformatted text is shown in an HTML <pre> tag.\n" +
"Formatting such as\n" +
- " * newlines\n" +
+ " * newlines\n" +
" * whitespace\n" +
"and such are preserved. HTML tags, \n"+
"such as <b>bold</b>, are quoted.",
@@ -184,7 +182,7 @@ The rendering will look as shown in <<figure.components.label.content-mode>>.
[[figure.components.label.content-mode]]
.Label Content Modes
-image::img/label-modes.png[]
+image::img/label-modes.png[width=75%, scaledwidth=100%]
ifdef::web[]
@@ -266,7 +264,7 @@ You can specify the data source either in the constructor or by the
// Some property
ObjectProperty<String> property =
new ObjectProperty<String>("some value");
-
+
// Label that is bound to the property
Label label = new Label(property);
----
@@ -305,7 +303,3 @@ would be delegated through the label.
The [classname]#Label# component has a [literal]#++v-label++# overall style. In
the [parameter]#PREFORMATTED# content mode, the text is wrapped inside a
[literal]#++<pre>++# element.
-
-
-
-