From 4a4d05b0354829df86c4f106868d421dca349b34 Mon Sep 17 00:00:00 2001 From: Marko Gronroos Date: Mon, 25 Jul 2016 00:00:36 +0300 Subject: Rescaled images in layout chapter. Various small formatting fixes. Updated history and other matters in introduction. Change-Id: I0d5e76f7fb07f967dd04941a23e79dfb30049731 --- documentation/components/components-grid.asciidoc | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'documentation/components/components-grid.asciidoc') 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 fullNameColumn grid.addColumn(person -> { - return person.getFirstName() + " " + person.getLastName(); -}); +Column 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 <>, 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 <> 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 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 grid = new Grid(examplePersonList()); -- cgit v1.2.3