use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class GradientSection method createGradientControl.
private void createGradientControl(Composite parent) {
createLabel(parent, Messages.GradientSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
fGradientCombo = new Combo(parent, SWT.READ_ONLY);
getWidgetFactory().adapt(fGradientCombo, true, true);
fGradientCombo.setItems(GRADIENT_STYLES);
fGradientCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CompoundCommand result = new CompoundCommand();
for (EObject object : getEObjects()) {
if (isAlive(object)) {
Command cmd = new FeatureCommand(Messages.GradientSection_1, (IFeatures) object, IDiagramModelObject.FEATURE_GRADIENT, fGradientCombo.getSelectionIndex() - 1, IDiagramModelObject.FEATURE_GRADIENT_DEFAULT);
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
});
}
Aggregations