Browse Source

use GridVariant

master
GAM 4 years ago
parent
commit
c6d36abdef
2 changed files with 10 additions and 3 deletions
  1. +5
    -2
      src/main/java/com/example/application/views/results/ResultsView.java
  2. +5
    -1
      src/main/java/com/example/application/views/table/TableView.java

+ 5
- 2
src/main/java/com/example/application/views/results/ResultsView.java View File

@ -14,6 +14,7 @@ import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.grid.ColumnTextAlign;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.GridVariant;
import com.vaadin.flow.component.html.Label;
import com.vaadin.flow.component.icon.Icon;
import com.vaadin.flow.component.icon.VaadinIcon;
@ -101,7 +102,7 @@ public class ResultsView extends SeasonAndMatchdayNavigationView {
}
private void configureMatchdayLayout() {
// getMatchdayHeader().addClassName("big_header"); // add dates
getMatchdayHeader().addClassName("big_header"); // add dates
getMatchdayLayout().setPadding(false);
getMatchdayLayout().add(getMatchdayHeader(), getGrid());
@ -133,7 +134,9 @@ public class ResultsView extends SeasonAndMatchdayNavigationView {
getGrid().setWidth("32em");
getGrid().setHeightByRows(true);
getGrid().addClassName("my_grid");
// getGrid().addClassName("my_grid");
getGrid().addThemeVariants(GridVariant.LUMO_NO_BORDER,
GridVariant.LUMO_NO_ROW_BORDERS, GridVariant.LUMO_ROW_STRIPES);
}
private String getResultString(CalculatedMatch match) {


+ 5
- 1
src/main/java/com/example/application/views/table/TableView.java View File

@ -12,6 +12,7 @@ import com.example.application.views.main.MainView;
import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.grid.ColumnTextAlign;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.GridVariant;
import com.vaadin.flow.component.html.Label;
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
import com.vaadin.flow.function.ValueProvider;
@ -131,7 +132,10 @@ public class TableView extends SeasonAndMatchdayNavigationView {
getGrid().setWidth("51em");
getGrid().setHeightByRows(true);
getGrid().addClassName("my_grid");
// getGrid().addClassName("my_grid");
getGrid().addThemeVariants(GridVariant.LUMO_NO_BORDER,
GridVariant.LUMO_NO_ROW_BORDERS, GridVariant.LUMO_ROW_STRIPES);
}
private String getResultString(PlayerForTable player) {


Loading…
Cancel
Save