Package org.eclipse.emf.databinding

Examples of org.eclipse.emf.databinding.EMFUpdateValueStrategy


      ComboViewer v = new ComboViewer( container, SWT.READ_ONLY );
      v.setLabelProvider( new LabelProvider() );
      v.setContentProvider( ArrayContentProvider.getInstance() );
      v.setInput( IconType.VALUES );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__KIND );
      dbContext.bindValue( selProp.observe( v ), prop.observe( o ), new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ),
          new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "URL*:" );

      tUrl = new Text( container, SWT.BORDER );
      tUrl.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__HREF );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tUrl ), prop.observe( o ),
          new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "Depth:" );

      ComboViewer v = new ComboViewer( container, SWT.READ_ONLY );
      v.setLabelProvider( new LabelProvider() );
      v.setContentProvider( ArrayContentProvider.getInstance() );
      // TODO not hard coded here
      v.setInput( new String[] { "8", "24", "32" } );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__DEPTH );
      dbContext.bindValue( selProp.observe( v ), prop.observe( o ), new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ),
          new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "Width:" );

      tWidth = new Text( container, SWT.BORDER );
      tWidth.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__WIDTH );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tWidth ), prop.observe( o ),
          new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "Height:" );

      tHeight = new Text( container, SWT.BORDER );
      tHeight.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__HEIGHT );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tHeight ), prop.observe( o ), new EMFUpdateValueStrategy(
          EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    return area;
  }
View Full Code Here


      ComboViewer v = new ComboViewer( container, SWT.READ_ONLY );
      v.setLabelProvider( new LabelProvider() );
      v.setContentProvider( ArrayContentProvider.getInstance() );
      v.setInput( SplashMode.values() );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, SPLASH__MODE );
      dbContext.bindValue( selProp.observe( v ), prop.observe( o ), new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ),
          new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "URL*:" );

      tUrl = new Text( container, SWT.BORDER );
      tUrl.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, SPLASH__HREF );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tUrl ), prop.observe( o ),
          new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }
    return area;
  }
View Full Code Here

      tFolder.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      GridData tFolderGD = new GridData( GridData.FILL_HORIZONTAL );
      tFolderGD.horizontalSpan = 3;
      tFolder.setLayoutData( tFolderGD );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, KEY_VALUE_PAIR__KEY );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tFolder ), prop.observe( o ), new EMFUpdateValueStrategy(
          EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "File*:" );

      tFile = new Text( container, SWT.BORDER );
      tFile.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      tFile.setEditable( false );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, KEY_VALUE_PAIR__VALUE );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tFile ), prop.observe( o ),
          new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
      Button bFilesystem = new Button( container, SWT.NONE );
      bFilesystem.setText( "Filesystem ..." );
      bFilesystem.addSelectionListener( new SelectionAdapter() {
        @Override
        public void widgetSelected( final SelectionEvent e ) {
View Full Code Here

      l.setText( "Name*:" );

      tName = new Text( container, SWT.BORDER );
      tName.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, PARAM__NAME );
      dbContext.bindValue( tProp.observe( tName ), prop.observe( o ), new EMFUpdateValueStrategy(
          EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "Value*:" );

      tValue = new Text( container, SWT.BORDER );
      tValue.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, PARAM__VALUE );
      dbContext.bindValue( tProp.observe( tValue ), prop.observe( o ), new EMFUpdateValueStrategy(
          EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }
    return area;
  }
View Full Code Here

      tFontName = new Text( container, SWT.BORDER );
      GridData tFontGD = new GridData( GridData.FILL_HORIZONTAL );
      tFontGD.horizontalSpan = 2;
      tFontName.setLayoutData( tFontGD );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, KEY_VALUE_PAIR__KEY );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tFontName ), prop.observe( o ), new EMFUpdateValueStrategy(
          EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
    }

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "File*:" );

      tFile = new Text( container, SWT.BORDER );
      tFile.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
      tFile.setEditable( false );
      IEMFValueProperty prop = EMFEditProperties.value( editingDomain, KEY_VALUE_PAIR__VALUE );
      dbContext.bindValue( tProp.observeDelayed( DELAY, tFile ), prop.observe( o ),
          new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
      Button b = new Button( container, SWT.NONE );
      b.setText( "Browse ..." );
      b.addSelectionListener( new SelectionAdapter() {
        @Override
        public void widgetSelected( final SelectionEvent e ) {
View Full Code Here

TOP

Related Classes of org.eclipse.emf.databinding.EMFUpdateValueStrategy

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.