Package org.eclipse.core.databinding.observable.value

Examples of org.eclipse.core.databinding.observable.value.IObservableValue


    ObservableTracker.getterCalled(this);
    return ((IObservableValue) detailList.get(index)).getValue();
  }

  public Object set(int index, Object element) {
    IObservableValue detail = (IObservableValue) detailList.get(index);
    Object oldElement = detail.getValue();
    detail.setValue(element);
    return oldElement;
  }
View Full Code Here


      masterList.removeStaleListener(masterStaleListener);
    }

    if (detailList != null) {
      for (Iterator iter = detailList.iterator(); iter.hasNext();) {
        IObservableValue detailValue = (IObservableValue) iter.next();
        detailValue.dispose();
      }
      detailList.clear();
    }

    masterList = null;
View Full Code Here

  private void recompute() {
    if (isDirty) {
      Map newContents = new HashMap();
      for (Iterator it = bindings.iterator(); it.hasNext();) {
        Binding binding = (Binding) it.next();
        IObservableValue validationError = binding
            .getValidationStatus();
        dependencies.add(validationError);
        validationError.addChangeListener(markDirtyChangeListener);
        IStatus validationStatusValue = (IStatus) validationError
            .getValue();
        newContents.put(binding, validationStatusValue);
      }
      wrappedMap.putAll(newContents);
      isDirty = false;
View Full Code Here

    super.dispose();
  }

  private void removeElementChangeListener() {
    for (Iterator it = dependencies.iterator(); it.hasNext();) {
      IObservableValue observableValue = (IObservableValue) it.next();
      observableValue.removeChangeListener(markDirtyChangeListener);
    }
  }
View Full Code Here

    }
    String parentPath = path.substring(0, index);
    IObservable observable = ScopeManager.observeValue(getControl(),
        source, parentPath, getUpdateSourceTrigger());
    if (observable != null) {
      IObservableValue observableValue = (IObservableValue) observable;
      Object type = observableValue.getValueType();
      if (type != null) {
        return UserData.isUIElementType(type);
      }
    }
    return false;
View Full Code Here

        return observable;
      }
      observable = dataProvider.observe(object, propertyName, type,
          observeKind);
      if (observable instanceof IObservableValue) {
        IObservableValue activeValue = (IObservableValue) observable;

        Object valueType = activeValue.getValueType();
        if (valueType instanceof Class<?>) {
          // TODO maybe need to moved in IDataProvider
          Class<?> classType = (Class<?>) valueType;
          if (valueType != null && classType.isArray()) {
            // Create a IObserableValue to handle the connection
View Full Code Here

      observableValue = new AggregateObservableValue(values,
          getConverter());
    }

    IObservableValue observableWidget = getObservableWidget();

    IDataProvider dataProvider = getDataProvider();
    if (dataProvider != null) {
      BindingGate bindingGate = getBindingGate();
      if (bindingGate != null) {
View Full Code Here

    if (dictionary == null) {
      dictionary = new HashMap<Object, Object>();
    }
    dictionary.put(key, value);
    if (observableValueManager != null && (key instanceof IProperty)) {
      IObservableValue observableValue = observableValueManager
          .getValue((IProperty) key);
      observableValue.setValue(value);
    }
  }
View Full Code Here

      bindingTarget = XWT.getDataContext(widget);
    }
    if (!(bindingTarget instanceof IObservableValue)) {
      return;
    }
    IObservableValue observableValue = (IObservableValue) bindingTarget;
    changeListener = new ValueChangeListener(target);
    observableValue.addChangeListener(changeListener);
    changeListener.doHandleChange(false); // get default value
  }
View Full Code Here

      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    if (value instanceof IObservableValue) {
      IObservableValue observableValue = (IObservableValue) value;
      value = observableValue.getValue();
    }
    if (value instanceof Image) {
      return (Image) value;
    } else if (value != null) {
      value = ObjectUtil.resolveValue(value, Image.class, value);
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.observable.value.IObservableValue

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.