use of org.eclipse.core.databinding.AggregateValidationStatus in project portfolio by buchen.
the class BindingHelper method createErrorLabel.
public final void createErrorLabel(Composite editArea) {
// error label
Label errorLabel = new Label(editArea, SWT.NONE);
GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(errorLabel);
// error label
//
context.bindValue(//
WidgetProperties.text().observe(errorLabel), //
new AggregateValidationStatus(context, AggregateValidationStatus.MAX_SEVERITY), //
null, new UpdateValueStrategy().setConverter(new StatusTextConverter()));
}
use of org.eclipse.core.databinding.AggregateValidationStatus in project portfolio by buchen.
the class AbstractTransactionDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Composite editArea = new Composite(area, SWT.NONE);
FormLayout layout = new FormLayout();
layout.marginWidth = 5;
layout.marginHeight = 5;
editArea.setLayout(layout);
createFormElements(editArea);
// $NON-NLS-1$
IObservableValue<IStatus> calculationStatus = BeanProperties.value("calculationStatus").observe(model);
this.context.addValidationStatusProvider(new MultiValidator() {
@Override
protected IStatus validate() {
return calculationStatus.getValue();
}
});
// $NON-NLS-1$
context.bindValue(// $NON-NLS-1$
PojoProperties.value("status").observe(status), new AggregateValidationStatus(context, AggregateValidationStatus.MAX_SEVERITY));
return editArea;
}
Aggregations