Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.DataBindingContext


        EOEntity destinationEntity = _relationship.getDestination();
        if (destinationEntity != null) {
          _modelComboViewer.setSelection(new StructuredSelection(destinationEntity.getModel()));
        }

        _bindingContext = new DataBindingContext();
        _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_relationship, EORelationship.NAME), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_definitionText, SWT.Modify), BeansObservables.observeValue(_relationship, EORelationship.DEFINITION), null, null);
        //_bindingContext.bindValue(SWTObservables.observeSelection(_toOneButton), BeansObservables.observeValue(_relationship, EORelationship.TO_ONE), null, new BooleanUpdateValueStrategy());
        _bindingContext.bindValue(SWTObservables.observeSelection(_toManyButton), BeansObservables.observeValue(_relationship, EORelationship.TO_MANY), null, new BooleanUpdateValueStrategy());
        _bindingContext.bindValue(SWTObservables.observeSelection(_optionalButton), BeansObservables.observeValue(_relationship, EORelationship.OPTIONAL), null, new BooleanUpdateValueStrategy());
View Full Code Here


      disposeBindings();

      _entityIndex = entityIndex;
      if (_entityIndex != null) {
        _selectedAttribute = null;
        _dataBindingContext = new DataBindingContext();
        //_dataBindingContext.bindValue(ViewersObservables.observeSingleSelection(_attributesComboViewer), BeansObservables.observeValue(this, "selectedAttribute"), null, null);
        _selectedAttributeBinding = new ComboViewerBinding(_attributesComboViewer, this, "selectedAttribute", null, null, null);

        updateAttributes();
        updateButtons();
View Full Code Here

  public void setArgument(AbstractEOArgument _argument) {
    if (myBindingContext != null) {
      myBindingContext.dispose();
    }
    if (_argument != null) {
      myBindingContext = new DataBindingContext();
      myBindingContext.bindValue(SWTObservables.observeText(myPrecisionText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.PRECISION), null, null);
      myBindingContext.bindValue(SWTObservables.observeText(myScaleText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.SCALE), null, null);
    }
  }
View Full Code Here

  public void setArgument(AbstractEOArgument _argument) {
    if (myBindingContext != null) {
      myBindingContext.dispose();
    }
    if (_argument != null) {
      myBindingContext = new DataBindingContext();
      myBindingContext.bindValue(SWTObservables.observeText(myExternalWidthText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.WIDTH), null, null);
    }
  }
View Full Code Here

    disposeBindings();

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    _fetchSpecification = (EOFetchSpecification) selectedObject;
    if (_fetchSpecification != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.NAME), null, null);
      Binding qualifierBinding = _bindingContext.bindValue(SWTObservables.observeText(_qualifierText, SWT.Modify), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.QUALIFIER_STRING), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_errorLabel), qualifierBinding.getValidationStatus(), null, null);
      _entityTreeViewUpdater.setEntity(_fetchSpecification.getEntity());
    }
View Full Code Here

    }
    if (myArgumentTypeBinding != null) {
      myArgumentTypeBinding.dispose();
    }
    if (_argument != null) {
      myBindingContext = new DataBindingContext();
      myBindingContext.bindValue(SWTObservables.observeText(myExternalWidthText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.WIDTH), null, null);
      myBindingContext.bindValue(SWTObservables.observeText(myValueClassNameText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.VALUE_CLASS_NAME), null, null);
      myBindingContext.bindValue(SWTObservables.observeText(myValueTypeText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.VALUE_TYPE), null, null);
      myBindingContext.bindValue(SWTObservables.observeText(myFactoryClassText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.VALUE_FACTORY_CLASS_NAME), null, null);
      myBindingContext.bindValue(SWTObservables.observeText(myFactoryMethodText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.VALUE_FACTORY_METHOD_NAME), null, null);
View Full Code Here

    disposeBindings();

    _databaseConfig = databaseContext;

    if (_databaseConfig != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_usernameText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.USERNAME), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_passwordText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.PASSWORD), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_urlText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.URL), null, null);
    }
  }
View Full Code Here

  public void setArgument(AbstractEOArgument _argument) {
    if (myBindingContext != null) {
      myBindingContext.dispose();
    }
    if (_argument != null) {
      myBindingContext = new DataBindingContext();
      myBindingContext.bindValue(SWTObservables.observeText(myPrecisionText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.PRECISION), null, null);
    }
  }
View Full Code Here

   *            das Ameisenprojekt
   */
  public ADataBindableComposite(Composite pParent, int pStyle, AntController pController) {
    super(pParent, pStyle, pController);
    _realm = SWTObservables.getRealm(Display.getDefault());
    _dbc = new DataBindingContext(_realm);
  }
View Full Code Here

   
  }
 
  protected DataBindingContext initDataBindings() {
   
    DataBindingContext bindingContext = super.initDataBindings();
   
    //
    IObservableValue observeTextRepositoryDestinationTextObserveWidget = WidgetProperties.text(SWT.FocusOut).observe(repositoryDestinationText);
    IObservableValue managedConnectionFactoryRepositoryDestObserveValue = EMFEditProperties.value(editingDomain, FeaturePath.fromList(Literals.DESTINATION_DATA_STORE_ENTRY__VALUE, Literals.DESTINATION_DATA__REPOSITORY_DEST)).observe(destinationDataStoreEntry);
    bindingContext.bindValue(observeTextRepositoryDestinationTextObserveWidget, managedConnectionFactoryRepositoryDestObserveValue, null, null);
    //
    IObservableValue observeTextRepositoryUserTextObserveWidget = WidgetProperties.text(SWT.FocusOut).observe(repositoryUserText);
    IObservableValue managedConnectionFactoryRepositoryUserObserveValue = EMFEditProperties.value(editingDomain, FeaturePath.fromList(Literals.DESTINATION_DATA_STORE_ENTRY__VALUE, Literals.DESTINATION_DATA__REPOSITORY_USER)).observe(destinationDataStoreEntry);
    bindingContext.bindValue(observeTextRepositoryUserTextObserveWidget, managedConnectionFactoryRepositoryUserObserveValue, null, null);
    //
    IObservableValue observeTextRepositoryPasswordTextObserveWidget = WidgetProperties.text(SWT.FocusOut).observe(repositoryPasswordText);
    IObservableValue managedConnectionFactoryRepositoryPasswdObserveValue = EMFEditProperties.value(editingDomain, FeaturePath.fromList(Literals.DESTINATION_DATA_STORE_ENTRY__VALUE, Literals.DESTINATION_DATA__REPOSITORY_PASSWD)).observe(destinationDataStoreEntry);
    bindingContext.bindValue(observeTextRepositoryPasswordTextObserveWidget, managedConnectionFactoryRepositoryPasswdObserveValue, null, null);
    //
    IObservableValue observeSelectionRespositorySncBtnObserveWidget = WidgetProperties.selection().observe(respositorySncBtn);
    IObservableValue managedConnectionFactoryRepositorySncObserveValue = EMFEditProperties.value(editingDomain, FeaturePath.fromList(Literals.DESTINATION_DATA_STORE_ENTRY__VALUE, Literals.DESTINATION_DATA__REPOSITORY_SNC)).observe(destinationDataStoreEntry);
    UpdateValueStrategy strategy_15 = new UpdateValueStrategy();
    strategy_15.setConverter(new Boolean2StringConverter());
    UpdateValueStrategy repositorySncModelStrategy = new UpdateValueStrategy();
    repositorySncModelStrategy.setConverter(new String2BooleanConverter());
    bindingContext.bindValue(observeSelectionRespositorySncBtnObserveWidget, managedConnectionFactoryRepositorySncObserveValue, strategy_15, repositorySncModelStrategy);
    //
    IObservableValue observeSelectionRepositoryRoundtripOptimizationBtnObserveWidget = WidgetProperties.selection().observe(repositoryRoundtripOptimizationBtn);
    IObservableValue managedConnectionFactoryRepositoryRoundtripOptimizationObserveValue = EMFEditProperties.value(editingDomain, FeaturePath.fromList(Literals.DESTINATION_DATA_STORE_ENTRY__VALUE, Literals.DESTINATION_DATA__REPOSITORY_ROUNDTRIP_OPTIMIZATION)).observe(destinationDataStoreEntry);
    UpdateValueStrategy strategy_16 = new UpdateValueStrategy();
    strategy_16.setConverter(new Boolean2StringConverter());
    UpdateValueStrategy repositoryRoundtripOptimizationModelStrategy = new UpdateValueStrategy();
    repositoryRoundtripOptimizationModelStrategy.setConverter(new String2BooleanConverter());
    bindingContext.bindValue(observeSelectionRepositoryRoundtripOptimizationBtnObserveWidget, managedConnectionFactoryRepositoryRoundtripOptimizationObserveValue, strategy_16, repositoryRoundtripOptimizationModelStrategy);

    return bindingContext;
 
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.DataBindingContext

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.