aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/components/components-grid.asciidoc
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-04-04 14:45:11 +0300
committerIlia Motornyi <elmot@vaadin.com>2017-04-04 13:45:11 +0200
commit973564d475617298e5cb9c7e9286d5d3e40dcf66 (patch)
tree2068dde298312117ef3fd2a8c6425b8d862aaf09 /documentation/components/components-grid.asciidoc
parent18a0b1e45cea695ac5700ea91c95a26d6accfb5c (diff)
downloadvaadin-framework-973564d475617298e5cb9c7e9286d5d3e40dcf66.tar.gz
vaadin-framework-973564d475617298e5cb9c7e9286d5d3e40dcf66.zip
Add notification of pre-release renderers to grid documentation
Diffstat (limited to 'documentation/components/components-grid.asciidoc')
-rw-r--r--documentation/components/components-grid.asciidoc65
1 files changed, 34 insertions, 31 deletions
diff --git a/documentation/components/components-grid.asciidoc b/documentation/components/components-grid.asciidoc
index c43a7ef04f..1ab9fa89ba 100644
--- a/documentation/components/components-grid.asciidoc
+++ b/documentation/components/components-grid.asciidoc
@@ -484,6 +484,40 @@ Column<Person, Date> bornColumn = grid.addColumn(Person::getBirthDate,
Optionally, a locale can be given. Otherwise, the default locale (in the
component tree) is used.
+[classname]#HTMLRenderer#:: Renders the cell as HTML.
+This allows formatting the cell content, as well as using HTML features such as hyperlinks.
+
++
+Set the renderer in the [classname]#Grid.Column# object:
++
+[source, java]
+----
+Column<Person, String> htmlColumn grid.addColumn(person ->
+ "<a href='" + person.getDetailsUrl() + "' target='_top'>info</a>",
+ new HtmlRenderer());
+----
+
+[classname]#NumberRenderer#:: Formats column values with a numeric type extending [classname]#Number#:
+[classname]#Integer#, [classname]#Double#, etc. The format can be specified
+either by the subclasses of [classname]#java.text.NumberFormat#, namely
+[classname]#DecimalFormat# and [classname]#ChoiceFormat#, or by
+[methodname]#String.format()#.
+
++
+For example:
++
+[source, java]
+----
+// Use decimal format
+Column<Integer> birthYear = grid.addColumn(Person::getBirthYear,
+ new NumberRenderer(new DecimalFormat("in #### AD")));
+----
+
+[classname]#ProgressBarRenderer#:: Renders a progress bar in a column with a [classname]#Double# type. The value
+must be between 0.0 and 1.0.
+
+IMPORTANT: The following renderers are to be released in version 8.1 and are currently only available in link:https://vaadin.com/releases[pre-release versions] of the framework, starting from 8.1.0.alpha3.
+
[classname]#LocalDateRenderer#::
Formats a column with the [classname]#LocalDate# type.
The renderer can be constructed with a [classname]#DateTimeFormatter#, or with a custom pattern string.
@@ -531,37 +565,6 @@ Column<Person, LocalDateTime> bornColumn =
new LocalDateTimeRenderer("yyyy.MM.dd 'at' hh:mm"));
----
-[classname]#HTMLRenderer#:: Renders the cell as HTML.
-This allows formatting the cell content, as well as using HTML features such as hyperlinks.
-
-+
-Set the renderer in the [classname]#Grid.Column# object:
-+
-[source, java]
-----
-Column<Person, String> htmlColumn grid.addColumn(person ->
- "<a href='" + person.getDetailsUrl() + "' target='_top'>info</a>",
- new HtmlRenderer());
-----
-
-[classname]#NumberRenderer#:: Formats column values with a numeric type extending [classname]#Number#:
-[classname]#Integer#, [classname]#Double#, etc. The format can be specified
-either by the subclasses of [classname]#java.text.NumberFormat#, namely
-[classname]#DecimalFormat# and [classname]#ChoiceFormat#, or by
-[methodname]#String.format()#.
-
-+
-For example:
-+
-[source, java]
-----
-// Use decimal format
-Column<Integer> birthYear = grid.addColumn(Person::getBirthYear,
- new NumberRenderer(new DecimalFormat("in #### AD")));
-----
-
-[classname]#ProgressBarRenderer#:: Renders a progress bar in a column with a [classname]#Double# type. The value
-must be between 0.0 and 1.0.
[classname]#ComponentRenderer#:: Renders a Vaadin [classname]#Component# in a column. Since components
are quite complex, the [classname]#ComponentRenderer# comes with possible performance issues.