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

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


        bindings.setModel(beanObserve, modelProperty);
        return bindings;
      }
    }
    //
    FieldBindingInfo fieldBinding = widgetObserve.createFieldBinding(targetProperty, null);
    fieldBinding.setModel(beanObserve, modelProperty);
    return fieldBinding;
  }
View Full Code Here


    }
  }

  public boolean canMoveBinding(IBindingInfo ibinding, int targetIndex, boolean upDown) {
    if (ibinding instanceof FieldBindingInfo) {
      FieldBindingInfo binding = (FieldBindingInfo) ibinding;
      if (binding.getParentBinding() == null) {
        BindingInfo target = m_bindings.get(targetIndex);
        if (target instanceof FieldBindingInfo) {
          FieldBindingInfo fieldTarget = (FieldBindingInfo) target;
          return fieldTarget.getParentBinding() == null;
        }
      } else {
        if (binding.isAutobind()) {
          return false;
        }
        BindingInfo target = m_bindings.get(targetIndex);
        if (target instanceof FieldBindingInfo) {
          FieldBindingInfo fieldTarget = (FieldBindingInfo) target;
          return binding.getParentBinding() == fieldTarget.getParentBinding()
              && !fieldTarget.isAutobind();
        }
        return false;
      }
    }
    return true;
View Full Code Here

    saveEdit();
  }

  private int configureMoveUpDown(IBindingInfo ibinding, int sourceIndex, int targetIndex) {
    if (ibinding instanceof FieldBindingInfo) {
      FieldBindingInfo binding = (FieldBindingInfo) ibinding;
      if (binding.getParentBinding() != null) {
        return targetIndex;
      }
    }
    //
    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 {
View Full Code Here

      return new ComboBoxFieldBindingInfo(this, targetProperty, parsedProperty);
    }
    if (m_propertiesSupport.getTimeFieldClass().isAssignableFrom(getObjectType())) {
      return new TimeFieldBindingInfo(this, targetProperty, parsedProperty);
    }
    return new FieldBindingInfo(this, targetProperty, parsedProperty);
  }
View Full Code Here

        String property = CoreUtils.evaluate(String.class, editor, arguments[1]);
        Assert.isNotNull(property);
        property = "\"" + property + "\"";
        //
        if (FIELD_BINDINGS.equals(signature)) {
          return new FieldBindingInfo(target, targetProperty, property);
        }
        if (COMBOBOX_FIELD_BINDINGS.equals(signature)) {
          return new ComboBoxFieldBindingInfo(target, targetProperty, property);
        }
        if (TIME_FIELD_BINDINGS.equals(signature)) {
View Full Code Here

      if (free) {
        menuManager.add(new Action(field.getPresentation().getTextForBinding()) {
          @Override
          public void run() {
            try {
              FieldBindingInfo binding = m_binding.createFieldBinding(field);
              UIContentContainer<FieldBindingInfo> provider =
                  new UIContentContainer<FieldBindingInfo>(m_provider, binding, "Binding: ");
              createPage(insertIndex, provider, true);
              if (m_multiTargetRunnable != null) {
                addTargetRouter(provider, true);
View Full Code Here

      }
      if (element instanceof BindingsInfo) {
        return BINDINGS_IMAGE;
      }
      if (element instanceof FieldBindingInfo) {
        FieldBindingInfo binding = (FieldBindingInfo) element;
        if (binding.getParentBinding() == null) {
          return FIELD_BINDING_IMAGE;
        }
        return binding.isAutobind() ? FORM_AUTO_FIELD_BINDING_IMAGE : FORM_FIELD_BINDING_IMAGE;
      }
    }
    return null;
  }
View Full Code Here

    for (final WidgetObserveInfo field : m_fields) {
      menuManager.add(new Action(field.getPresentation().getTextForBinding()) {
        @Override
        public void run() {
          try {
            FieldBindingInfo binding = m_binding.createFieldBinding(field);
            createPage(insertIndex, new UIContentContainer<FieldBindingInfo>(m_provider,
                binding,
                "Binding: "), true);
            configure();
            m_listener.calculateFinish();
View Full Code Here

TOP

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

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.