Hi, thanks for the great Addon!
I failed though to set a full with to a card. Using the withItemWidth or -Size didn’t do the trick in an environment with repeating minmax columns, because setting i.e. a width of 3 implies that the grid HAS 3 columns. but when the area is so small that it should have only 1 column it does not work, so i extended your FlexibleGridLayout by following code to have the possibility to add a start and end column (grid-column: 1/-1;)
public FlexibleGridLayout withItemWithStartEnd(Component component, String start, String end) {
getContent().add(component);
setItemStartEnd(component, start, end);
return this;
}
public void setItemStartEnd(Component component, String start, String end) {
getContent().setColumn(component, new StartEnd(start, end));
}
public static class StartEnd implements RowOrColUnit {
private final String start;
private final String end;
public StartEnd(String start, String end) {
this.start = start;
this.end = end;
}
@Override
public boolean hasPrefix() {
return start != null;
}
@Override
public String getPrefixValue() {
return start;
}
@Override
public boolean hasSuffix() {
return end != null;
}
@Override
public String getSuffixValue() {
return end;
}
@Override
public String getValue() {
return "/";
}
}
I hope I didn’t overlook some existing functionality. If not, feel free to add my little extension.