summaryrefslogtreecommitdiffstats
path: root/documentation/components/components-grid.asciidoc
diff options
context:
space:
mode:
authorMarko Gronroos <magi@vaadin.com>2016-07-25 00:00:36 +0300
committerArtur Signell <artur@vaadin.com>2016-08-05 10:19:47 +0300
commit4a4d05b0354829df86c4f106868d421dca349b34 (patch)
treedb70be8fce2298dbf427775f07b1146e82c66e33 /documentation/components/components-grid.asciidoc
parent3ea6a0087b140a13ed0685afa2ffe08a45b82719 (diff)
downloadvaadin-framework-4a4d05b0354829df86c4f106868d421dca349b34.tar.gz
vaadin-framework-4a4d05b0354829df86c4f106868d421dca349b34.zip
Rescaled images in layout chapter. Various small formatting fixes. Updated history and other matters in introduction.
Change-Id: I0d5e76f7fb07f967dd04941a23e79dfb30049731
Diffstat (limited to 'documentation/components/components-grid.asciidoc')
-rw-r--r--documentation/components/components-grid.asciidoc23
1 files changed, 6 insertions, 17 deletions
diff --git a/documentation/components/components-grid.asciidoc b/documentation/components/components-grid.asciidoc
index 285f2772bf..b56b762e46 100644
--- a/documentation/components/components-grid.asciidoc
+++ b/documentation/components/components-grid.asciidoc
@@ -132,7 +132,6 @@ from the grid.
For example:
-
[source, java]
----
grid.addSelectionListener(selectionEvent -> {
@@ -289,8 +288,9 @@ columns in their natural order.
[source, java]
----
-grid.setColumnOrder(firstnameColumn, lastnameColumn, bornColumn,
- birthplaceColumn, diedColumn);
+grid.setColumnOrder(firstnameColumn, lastnameColumn,
+ bornColumn, birthplaceColumn,
+ diedColumn);
----
Note that the method can not be used to hide columns. You can hide columns with
@@ -374,14 +374,11 @@ lambdas:
[source, java]
----
// Add generated full name column
-Column<String> fullNameColumn grid.addColumn(person -> {
- return person.getFirstName() + " " + person.getLastName();
-});
+Column<String> fullNameColumn = grid.addColumn(person ->
+ person.getFirstName() + " " + person.getLastName());
fullNameColumn.setHeaderCaption("Full name");
-
----
-
[[components.grid.renderer]]
== Column Renderers
@@ -682,8 +679,6 @@ You can set a component in a header or footer cell with
described in <<components.grid.filtering>>, which also gives an example of the
use.
-
-
[[components.grid.filtering]]
== Filtering
@@ -699,7 +694,6 @@ image::img/grid-filtering.png[width=50%, scaledwidth=80%]
The filtering illustrated in <<figure.components.grid.filtering>> can be created
as follows:
-
[source, java]
----
// Have a list of persons
@@ -726,8 +720,7 @@ for (Column<?> col: grid.getColumns()) {
// Filter the list of items
List<String> filteredList =
- Lists.newArrayList(personList.filter(
- persons,
+ Lists.newArrayList(personList.filter(persons,
Predicates.containsPattern(event.getValue())));
// Apply filtered data
@@ -737,11 +730,8 @@ for (Column<?> col: grid.getColumns()) {
cell.setComponent(filterField);
}
-
-
----
-
[[components.grid.sorting]]
== Sorting
@@ -907,7 +897,6 @@ public class Person implements Serializable {
We can now use a [classname]#BeanBinder# in the [classname]#Grid# as
follows:
-
[source, java]
----
Grid<Person> grid = new Grid(examplePersonList());