Для управления стилями строк группировки, в метод setStyleProvider необходимо передавать экземпляр интерфейса GroupStyleProvider, например:
customersTable.setStyleProvider(new GroupTable.GroupStyleProvider<Customer>() {
@Nullable
@Override
public String getStyleName(GroupInfo info) {
MetaPropertyPath gradePropertyPath = customersDs.getMetaClass().getPropertyPath("grade");
if (gradePropertyPath != null && gradePropertyPath.equals(info.getProperty())) {
CustomerGrade grade = (CustomerGrade) info.getValue();
return getGradeStyle(grade);
}
return null;
}
@Override
public String getStyleName(Customer entity, @Nullable String property) {
if (property == null) {
return getGradeStyle(entity.getGrade());
}
return null;
}
});
Я подготовил тестовый проект на GitHub.
С уважением,
Глеб