use of org.openlca.core.model.DQScore in project olca-app by GreenDelta.
the class DQSystemInfoPage method createIndicatorMatrix.
private void createIndicatorMatrix(Composite composite) {
UI.gridLayout(composite, 2 * getModel().getScoreCount() + 3);
createHeader(composite, true);
createAddScoreButton(composite);
for (DQIndicator indicator : getModel().indicators) {
Text nameText = createTextCell(composite, 1, 15);
((GridData) nameText.getLayoutData()).verticalAlignment = SWT.TOP;
getBinding().onString(() -> indicator, "name", nameText);
indicatorTexts.put(indicator.position, nameText);
commentControl(composite, "indicators[" + indicator.position + "]");
for (DQScore score : indicator.scores) {
Text descriptionText = createTextCell(composite, 8, 8);
getBinding().onString(() -> score, "description", descriptionText);
descriptionText.setBackground(DQUI.getColor(score.position, getModel().getScoreCount()));
commentControl(composite, "indicators[" + indicator.position + "].scores[" + score.position + "].description");
}
createRemoveIndicatorButton(composite, indicator.position);
}
createAddIndicatorButton(composite);
for (int i = 1; i <= getModel().getScoreCount(); i++) {
UI.filler(composite);
createRemoveScoreButton(composite, i);
}
}
Aggregations