Package com.google.gdt.eclipse.designer.gxt.databinding.model.bindings

Examples of com.google.gdt.eclipse.designer.gxt.databinding.model.bindings.BindingsInfo


        FormBindingInfo formBinding = new FormBindingInfo(widgetObserve, targetProperty);
        formBinding.setModel(beanObserve, modelProperty);
        return formBinding;
      }
      if (widgetObserve instanceof BindingsWidgetObserveInfo) {
        BindingsInfo bindings = new BindingsInfo();
        bindings.setTarget(widgetObserve, targetProperty);
        bindings.setModel(beanObserve, modelProperty);
        return bindings;
      }
    }
    //
    FieldBindingInfo fieldBinding = widgetObserve.createFieldBinding(targetProperty, null);
View Full Code Here


    boolean up = sourceIndex > targetIndex;
    BindingInfo target = m_bindings.get(targetIndex);
    // configure target index
    if (target instanceof FieldBindingInfo) {
      FieldBindingInfo fieldTarget = (FieldBindingInfo) target;
      BindingsInfo parentBinding = fieldTarget.getParentBinding();
      //
      if (parentBinding != null) {
        if (up) {
          targetIndex = m_bindings.indexOf(parentBinding);
        } else {
          // skip all field bindings
          targetIndex += parentBinding.getFieldBindings().size();
          //
          target = m_bindings.get(targetIndex);
          if (target instanceof BindingsInfo) {
            // skip all field bindings
            BindingsInfo bindings = (BindingsInfo) target;
            targetIndex += bindings.getFieldBindings().size();
          }
        }
      }
    } else if (target instanceof BindingsInfo && !up) {
      // skip all field bindings
      BindingsInfo bindings = (BindingsInfo) target;
      targetIndex += bindings.getFieldBindings().size();
    }
    //
    return targetIndex;
  }
View Full Code Here

      ClassInstanceCreation creation,
      Expression[] arguments,
      IModelResolver resolver,
      IDatabindingsProvider provider) throws Exception {
    if (BINDINGS.equals(signature)) {
      BindingsInfo binding = new BindingsInfo();
      binding.setTarget(m_observables.get(1), m_observables.get(1).getSelfProperty());
      provider.getBindings().add(binding);
      return binding;
    }
    //
    if (FIELD_BINDINGS.equals(signature)
        || COMBOBOX_FIELD_BINDINGS.equals(signature)
        || TIME_FIELD_BINDINGS.equals(signature)
        || FORM_BINDING_1.equals(signature)
        || FORM_BINDING_2.equals(signature)) {
      WidgetObserveInfo target = getBindableWidget(arguments[0]);
      if (target == null) {
        AbstractParser.addError(
            editor,
            "Widget argument '" + arguments[0] + "' not found",
            new Throwable());
        return null;
      }
      WidgetPropertyObserveInfo targetProperty = target.getSelfProperty();
      Assert.isNotNull(targetProperty);
      //
      if (FORM_BINDING_1.equals(signature) || FORM_BINDING_2.equals(signature)) {
        FormBindingInfo binding = new FormBindingInfo(target, targetProperty);
        //
        if (arguments.length == 2) {
          boolean autobind = CoreUtils.evaluate(Boolean.class, editor, arguments[1]);
          binding.setAutobind(autobind);
        }
        //
        provider.getBindings().add(binding);
        return binding;
      }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gxt.databinding.model.bindings.BindingsInfo

Copyright © 2018 www.massapicom. 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.