Examples of IViewerValueProperty


Examples of org.eclipse.jface.databinding.viewers.IViewerValueProperty

    Composite container = new Composite( area, SWT.NONE );
    container.setLayout( new GridLayout( 2, false ) );
    container.setLayoutData( new GridData( GridData.FILL_BOTH ) );

    IViewerValueProperty selProp = ViewerProperties.singleSelection();
    IWidgetValueProperty tProp = WidgetProperties.text( SWT.Modify );

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

      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 );
View Full Code Here

Examples of org.eclipse.jface.databinding.viewers.IViewerValueProperty

    Composite container = new Composite( area, SWT.NONE );
    container.setLayout( new GridLayout( 2, false ) );
    container.setLayoutData( new GridData( GridData.FILL_BOTH ) );

    IViewerValueProperty selProp = ViewerProperties.singleSelection();
    IWidgetValueProperty tProp = WidgetProperties.text( SWT.Modify );

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

      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 );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.