|
|
@ -23,7 +23,7 @@ import com.vaadin.flow.component.orderedlayout.VerticalLayout; |
|
|
|
|
|
|
|
import java.util.NoSuchElementException; |
|
|
|
|
|
|
|
public class matchdayCard extends Div implements ContentConfigurable { |
|
|
|
public class MatchdayCard extends Div implements ContentConfigurable { |
|
|
|
|
|
|
|
private final Navigation navigation; |
|
|
|
|
|
|
@ -31,7 +31,7 @@ public class matchdayCard extends Div implements ContentConfigurable { |
|
|
|
private final Label headerLabel = new Label(); |
|
|
|
private final Grid<CalculatedMatch> grid = new Grid<>(); |
|
|
|
|
|
|
|
public matchdayCard(Navigation navigation) { |
|
|
|
public MatchdayCard(Navigation navigation) { |
|
|
|
this.navigation = navigation; |
|
|
|
|
|
|
|
addClassName("card"); |
|
|
@ -68,7 +68,7 @@ public class matchdayCard extends Div implements ContentConfigurable { |
|
|
|
grid.addColumn(calculatedMatch -> "vs.") |
|
|
|
.setHeader("vs.") |
|
|
|
.setTextAlign(ColumnTextAlign.CENTER) |
|
|
|
.setWidth("3em"); |
|
|
|
.setWidth("4em"); |
|
|
|
|
|
|
|
grid.addColumn(VaadinUtils.getPlayerRenderer(CalculatedMatch::getPlayer2)) |
|
|
|
.setHeader(headerPlayer2) |
|
|
@ -83,9 +83,9 @@ public class matchdayCard extends Div implements ContentConfigurable { |
|
|
|
|
|
|
|
grid.addComponentColumn(this::createButton) |
|
|
|
.setTextAlign(ColumnTextAlign.CENTER) |
|
|
|
.setWidth("3em"); |
|
|
|
.setWidth("4em"); |
|
|
|
|
|
|
|
grid.setWidth("38em"); // TODO: find a way to set this dynamically based on column widths |
|
|
|
grid.setWidth("40em"); // TODO: find a way to set this dynamically based on column widths |
|
|
|
grid.setHeightByRows(true); |
|
|
|
|
|
|
|
grid.addThemeVariants(GridVariant.LUMO_NO_BORDER, |