Examples of BindingGate


Examples of org.eclipse.e4.xwt.internal.core.BindingGate

      }
      return source;
    }

    IBindingContext dataBindingContext = getDataBindingContext();
    BindingGate bindingGate = new BindingGate(dataBindingContext);
    bindingGate.bind(sourceWidget, targetWidget, this);
    if (sourceWidget != null) {
      if (targetType != null && !targetType.isInstance(sourceWidget)) {
        return sourceWidget;     
      }
      // convert to final value
View Full Code Here

Examples of org.eclipse.e4.xwt.internal.core.BindingGate

        value = ((IObservableValue) observableSource).getValue();
      }
      return convertedValue(value);
    }

    BindingGate bindingContext = getBindingGate();

    if (bindingContext != null && observableSource != null) {
      Object target = getControl();
      if (target instanceof Text
          && getTargetProperty().equalsIgnoreCase("text")) {
        if (isSourcePropertyReadOnly()) {
          Text text = (Text) target;
          text.setEditable(false);
        }
      } else if (target instanceof Button
          && getTargetProperty().equalsIgnoreCase("selection")) {
        if (isSourcePropertyReadOnly()) {
          Button button = (Button) target;
          button.setEnabled(false);
        }
      } else if ((target instanceof Combo || target instanceof CCombo)
          && getTargetProperty().equalsIgnoreCase("text")) {
        if (isSourcePropertyReadOnly()) {
          Control control = (Control) target;
          control.setEnabled(false);
        }
      } else if (target instanceof MenuItem
          && getTargetProperty().equalsIgnoreCase("selection")) {
        if (isSourcePropertyReadOnly()) {
          MenuItem menuItem = (MenuItem) target;
          menuItem.setEnabled(false);
        }
      }
      bindingContext.bind(observableSource, observableWidget, this);
    }

    if (targetType != null && !targetType.isInstance(observableSource)) {
      return observableSource;     
    }
View Full Code Here

Examples of org.eclipse.e4.xwt.internal.core.BindingGate

  }

  private BindingGate getBindingGate() {
    if (this.bindingGate == null) {
      IBindingContext dataBindingContext = getDataBindingContext();
      this.bindingGate = new BindingGate(dataBindingContext);
    }

    return this.bindingGate;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.