Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch v3.0.0 into master #131

Merged
merged 12 commits into from
Feb 24, 2023
Next Next commit
refactor(demo): avoid use of deprecated constructor
  • Loading branch information
javier-godoy committed Feb 6, 2023
commit 1afd7a2226f437b74964fadce8b0123ef1142d8d
Original file line number Diff line number Diff line change
@@ -47,8 +47,7 @@ public BoundDemo() {

// Binded
final TwinColGrid<Book> twinColGrid =
new TwinColGrid<>(
availableBooks, "TwinColGrid demo with Binder and row select without checkbox")
new TwinColGrid<>(availableBooks)
.addSortableColumn(Book::getIsbn, Comparator.comparing(Book::getIsbn), "ISBN")
.addSortableColumn(Book::getTitle, Comparator.comparing(Book::getTitle), "Title")
.withAvailableGridCaption("Available books")
@@ -57,6 +56,8 @@ public BoundDemo() {
.withSizeFull()
.selectRowOnClick();

twinColGrid.setCaption("TwinColGrid demo with Binder and row select without checkbox");

final Binder<Library> binder = new Binder<>();
binder.forField(twinColGrid.asList()).asRequired().bind(Library::getBooks, Library::setBooks);
binder.setBean(library);
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ public DoubleClickDemo() {
initializeData();

final TwinColGrid<Book> twinColGrid =
new TwinColGrid<>(availableBooks, null)
new TwinColGrid<>(availableBooks)
.addSortableColumn(Book::getIsbn, Comparator.comparing(Book::getIsbn), "ISBN")
.addSortableColumn(Book::getTitle, Comparator.comparing(Book::getTitle), "Title")
.withAvailableGridCaption("Available books")
Original file line number Diff line number Diff line change
@@ -42,13 +42,14 @@ public FilterableDemo() {
initializeData();

final TwinColGrid<Book> twinColGrid =
new TwinColGrid<>(availableBooks, "TwinColGrid demo with filtering support")
new TwinColGrid<>(availableBooks)
.addFilterableColumn(Book::getIsbn, Book::getIsbn, "ISBN", "ISBN Filter", true)
.addFilterableColumn(Book::getTitle, "Title", "Title filter", false)
.withAvailableGridCaption("Available books")
.withSelectionGridCaption("Added books")
.withoutAddAllButton()
.withSizeFull();
twinColGrid.setCaption("TwinColGrid demo with filtering support");
twinColGrid.setValue(selectedBooks);

add(twinColGrid);
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ public OrientationDemo() {
initializeData();

final TwinColGrid<Book> twinColGrid =
new TwinColGrid<>(availableBooks, null)
new TwinColGrid<>(availableBooks)
.addSortableColumn(Book::getIsbn, Comparator.comparing(Book::getIsbn), "ISBN")
.addSortableColumn(Book::getTitle, Comparator.comparing(Book::getTitle), "Title")
.withAvailableGridCaption("Available books")