private Color containsColor;
private Color deletedColor;
private Color addedColor;
+ private Color disabledColor;
private ModelUpdate update;
containsColor = new Color(parent.getDisplay(), new RGB(255,255,220));
deletedColor = new Color(parent.getDisplay(), new RGB(255,220,220));
addedColor = new Color(parent.getDisplay(), new RGB(220,255,220));
+ disabledColor = new Color(parent.getDisplay(), new RGB(128,128,128));
this.setLayout(new GridLayout(1,false));
selectedStructure.remove(n);
}
changeBrowser.setChecked(n, sel);
- changeBrowser.setGrayed(n, false);
+ changeBrowser.setGrayed(n, !op.enabled());
}
}
} else {
else
return unchecked;
}
+
+ @Override
+ public Color getForeground(Object element) {
+ PropertyChange pc = (PropertyChange)element;
+ if (!pc.enabled())
+ return disabledColor;
+ return null;
+ }
+ }
+
+ protected abstract class PropertyChangeLabelProvider extends ColumnLabelProvider {
+
+ public PropertyChangeLabelProvider() {
+
+ }
+
+ @Override
+ public Color getForeground(Object element) {
+ PropertyChange pc = (PropertyChange)element;
+ if (!pc.enabled())
+ return disabledColor;
+ return null;
+ }
}
private class UpdateNodeLabelProvider extends ColumnLabelProvider {
return addedColor;
return null;
}
+
+ @Override
+ public Color getForeground(Object element) {
+ final UpdateNode node = (UpdateNode)element;
+ if (node.getOp() != null && !node.getOp().enabled())
+ return disabledColor;
+ return null;
+ }
}
private class SelectionEditingSupport extends EditingSupport {