Examples of IWidgetValueProperty


Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

    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 );
      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

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

    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 );
      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

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

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

    IWidgetValueProperty tProp = WidgetProperties.text( SWT.Modify );

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

      tFolder = new Text( container, SWT.BORDER );
      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
View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

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

    IWidgetValueProperty tProp = WidgetProperties.text( SWT.Modify );

    {
      Label l = new Label( container, SWT.NONE );
      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

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

        }
      });
    }

    {
      IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);

      Label l = new Label(parent, SWT.NONE);
      l.setText("Name");

      nameField = new Text(parent, SWT.BORDER);
      nameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      dbc.bindValue(textProp.observe(nameField), BeanProperties.value("name", String.class).observe(clazz));

      new Label(parent, SWT.NONE);
    }

    {
View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

        }
      });
    }

    {
      IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);

      Label l = new Label(parent, SWT.NONE);
      l.setText("Name");

      nameField = new Text(parent, SWT.BORDER);
      nameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      dbc.bindValue(textProp.observe(nameField), BeanProperties.value("name", String.class).observe(clazz));

      new Label(parent, SWT.NONE);
    }

    {
View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

    ScrolledForm scrolledForm = toolkit.createScrolledForm( form.getBody() );
    scrolledForm.getBody().setLayout( new GridLayout( 2, false ) );
    Composite sectionParent = scrolledForm.getBody();

    dbc = new DataBindingContext();
    IWidgetValueProperty textModify = WidgetProperties.text( SWT.Modify );
    IWidgetValueProperty selChange = WidgetProperties.selection();

    {
      Section section = toolkit.createSection( sectionParent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED );
      section.setText( "Build && Package Properties" );
      section.setDescription( "The following properties are needed to build the JavaFX-Application" );
      section.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

      Composite sectionClient = toolkit.createComposite( section );
      sectionClient.setLayout( new GridLayout( 4, false ) );

      {
        toolkit.createLabel( sectionClient, "Build Directory*:" );
        final Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        toolkit.createButton( sectionClient, "Filesystem ...", SWT.PUSH ).addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( final SelectionEvent e ) {
            String dir = handleBuildFilesystemDirectorySelection( t.getShell() );
            if ( dir != null ) {
              t.setText( dir );
            }
          }
        } );
        toolkit.createButton( sectionClient, "Workspace ...", SWT.PUSH ).addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( final SelectionEvent e ) {
            String dir = handleBuildWorkbenchDirectorySelection( t.getShell() );
            if ( dir != null ) {
              t.setText( dir );
            }
          }
        } );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ANT_TASK__BUILD_DIRECTORY );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Vendor name*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__INFO, INFO__VENDOR ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Application title*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain,
            FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__APPLICATION, APPLICATION__NAME ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Application version*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain,
            FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__APPLICATION, APPLICATION__VERSION ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Application class*:" );
        final Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );
        Button b = toolkit.createButton( sectionClient, "Browse ...", SWT.PUSH );
        b.addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( SelectionEvent e ) {
            String name = handleRootclassSelection( t.getShell() );
            if ( name != null ) {
              t.setText( name );
            }
          }
        } );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, false, false ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain,
            FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__APPLICATION, APPLICATION__MAINCLASS ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Preloader class:" );
        final Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );
        Button b = toolkit.createButton( sectionClient, "Browse ...", SWT.PUSH );
        b.addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( SelectionEvent e ) {
            String name = handlePreloaderclassSelection( t.getShell() );
            if ( name != null ) {
              t.setText( name );
            }
          }
        } );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, false, false ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain,
            FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__APPLICATION, APPLICATION__PRELOADERCLASS ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Splash:" );
        final Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );
        Button b = toolkit.createButton( sectionClient, "Browse ...", SWT.PUSH );
        b.addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( SelectionEvent e ) {
            String name = handleSplashImage( t.getShell() );
            if ( name != null ) {
              t.setText( name );
            }
          }
        } );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, false, false ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__SPLASH_IMAGE ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Manifest-Attributes:" )
            .setLayoutData( new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
        Composite container = toolkit.createComposite( sectionClient );
        GridLayout gl = new GridLayout( 2, false );
        gl.marginBottom = gl.marginHeight = gl.marginLeft = gl.marginRight = gl.marginTop = gl.marginWidth = 0;
        container.setLayout( gl );
        GridData gdContainer = new GridData( GridData.FILL_HORIZONTAL );
        gdContainer.horizontalSpan = 2;
        container.setLayoutData( gdContainer );

        Composite tableContainer = toolkit.createComposite( container );
        Table t = toolkit.createTable( tableContainer, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
        t.setHeaderVisible( true );
        t.setLinesVisible( true );

        GridData gdTable = new GridData( GridData.FILL_HORIZONTAL );
        gdTable.heightHint = t.getHeaderHeight() + t.getItemHeight() * 5;
        tableContainer.setLayoutData( gdTable );

        TableColumnLayout tablelayout = new TableColumnLayout();
        final TableViewer v = new TableViewer( t );
        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.heightHint = t.getHeaderHeight() + t.getItemHeight() * 5;
        v.getControl().setLayoutData( gd );
        v.setContentProvider( ArrayContentProvider.getInstance() );

        {
          TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
          c.setLabelProvider( new ColumnLabelProvider() {
            @Override
            public String getText( final Object element ) {
              return ( (Param) element ).getName();
            }
          } );
          tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 33 ) );
          c.getColumn().setText( "Name" );
        }

        {
          TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
          c.setLabelProvider( new ColumnLabelProvider() {
            @Override
            public String getText( final Object element ) {
              return ( (Param) element ).getValue();
            }
          } );
          tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 67 ) );
          c.getColumn().setText( "Value" );
        }
        tableContainer.setLayout( tablelayout );
        v.setInput( task.getManifestEntries() );

        Composite buttonComp = toolkit.createComposite( sectionClient );
        buttonComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.END, false, false ) );
        buttonComp.setLayout( new GridLayout() );

        {
          Button b = toolkit.createButton( buttonComp, "Add ...", SWT.PUSH );
          b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
          b.addSelectionListener( new SelectionAdapter() {
            @Override
            public void widgetSelected( final SelectionEvent e ) {
              if ( handleAddManifestAttr( getSite().getShell() ) ) {
                v.setInput( task.getManifestEntries() );
                v.setSelection( new StructuredSelection( task.getManifestEntries().get( task.getManifestEntries().size() - 1 ) ) );
              }
            }
          } );
        }

        {
          Button b = toolkit.createButton( buttonComp, "Remove", SWT.PUSH );
          b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
          b.addSelectionListener( new SelectionAdapter() {
            @Override
            public void widgetSelected( final SelectionEvent e ) {
              Param value = (Param) ( (IStructuredSelection) v.getSelection() ).getFirstElement();
              if ( value != null ) {
                if ( handleRemoveManifestAttr( value ) ) {
                  v.setInput( task.getManifestEntries() );
                }
              }
              else {
                MessageDialog.openWarning( getSite().getShell(), "Warning", "Please select an entry" );
              }
            }
          } );
        }
        {
          toolkit.createLabel( sectionClient, "Toolkit Type:" ).setLayoutData( new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
          ComboViewer c = new ComboViewer( sectionClient );
          c.getCombo().setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
          c.setContentProvider( new ArrayContentProvider() );
          c.setInput( ApplicationToolkitType.VALUES );
          IEMFValueProperty prop = EMFEditProperties.value( editingDomain,
              FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__APPLICATION, APPLICATION__TOOLKIT ) );
          dbc.bindValue( selChange.observe( c.getCombo() ), prop.observeDetail( bean ) );
        }
        {
          toolkit.createLabel( sectionClient, "Packaging Format:" ).setLayoutData( new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
          ComboViewer c = new ComboViewer( sectionClient );
          c.getCombo().setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
          c.setContentProvider( new ArrayContentProvider() );
          c.setInput( PackagingFormat.VALUES );
          IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__PACKAGING_FORMAT ) );
          dbc.bindValue( selChange.observe( c.getCombo() ), prop.observeDetail( bean ) );
        }
        {
          Button b = toolkit.createButton( sectionClient, "Convert CSS into binary form", SWT.CHECK );
          b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 4, 1 ) );
          IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__CSS_TO_BIN ) );
          dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
        }
        {
          Button b = toolkit.createButton( sectionClient, "Enable verbose build mode (Not recommended)", SWT.CHECK );
          b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 4, 1 ) );
          IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__VERBOSE ) );
          dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
        }
      }

      section.setClient( sectionClient );
    }
View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

    ScrolledForm scrolledForm = toolkit.createScrolledForm( form.getBody() );
    scrolledForm.getBody().setLayout( new GridLayout( 2, false ) );
    Composite sectionParent = scrolledForm.getBody();

    IWidgetValueProperty textModify = WidgetProperties.text( SWT.Modify );
    IWidgetValueProperty selChange = WidgetProperties.selection();

    {
      Section section = toolkit.createSection( sectionParent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED );
      section.setText( "Deploy Properties" );
      section.setDescription( "The following properties are needed to create a Java Webstart Deployment" );
      section.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

      Composite sectionClient = toolkit.createComposite( section );
      final int COLUMN_COUNT = 3;
      sectionClient.setLayout( new GridLayout( COLUMN_COUNT, false ) );

      {
        toolkit.createLabel( sectionClient, "Applet Width*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.horizontalSpan = COLUMN_COUNT - 1;
        t.setLayoutData( gd );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__WIDTH ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Applet Height*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.horizontalSpan = COLUMN_COUNT - 1;
        t.setLayoutData( gd );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__HEIGHT ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        Button b = toolkit.createButton( sectionClient, "Embed JNLP", SWT.CHECK );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, COLUMN_COUNT, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__EMBEDJNLP ) );
        dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
      }

      {
        Button b = toolkit.createButton( sectionClient, "Treat files as extensions", SWT.CHECK );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, COLUMN_COUNT, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__EXTENSION ) );
        dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
      }

      {
        Button b = toolkit.createButton( sectionClient, "Include deployment toolkit", SWT.CHECK );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, COLUMN_COUNT, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__INCLUDE_DT ) );
        dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
      }

      {
        Button b = toolkit.createButton( sectionClient, "Offline allowed", SWT.CHECK );
        b.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, COLUMN_COUNT, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__DEPLOY, DEPLOY__OFFLINE_ALLOWED ) );
        dbc.bindValue( selChange.observe( b ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Placeholder Ref.*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

    ScrolledForm scrolledForm = toolkit.createScrolledForm( form.getBody() );
    scrolledForm.getBody().setLayout( new GridLayout( 2, false ) );
    Composite sectionParent = scrolledForm.getBody();

    IWidgetValueProperty textModify = WidgetProperties.text( SWT.Modify );

    {
      Section section = toolkit.createSection( sectionParent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED );
      section.setText( "Signing Properties" );
      section.setDescription( "Information for signing result jar" );
      section.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

      Composite sectionClient = toolkit.createComposite( section );
      sectionClient.setLayout( new GridLayout( 4, false ) );

      {
        toolkit.createLabel( sectionClient, "Alias*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__SIGNJAR, SIGN_JAR__ALIAS ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Key-Password*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__SIGNJAR, SIGN_JAR__KEYPASS ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Keystore*:" );
        final Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        toolkit.createButton( sectionClient, "Filesystem ...", SWT.PUSH ).addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( final SelectionEvent e ) {
            String v = handleKeyStoreFilesystemSelection( t.getShell() );
            if ( v != null ) {
              t.setText( v );
            }
          }
        } );
        toolkit.createButton( sectionClient, "Workspace ...", SWT.PUSH ).addSelectionListener( new SelectionAdapter() {
          @Override
          public void widgetSelected( final SelectionEvent e ) {
            String v = handleKeyStoreWorkspaceSelection( t.getShell() );
            if ( v != null ) {
              t.setText( v );
            }
          }
        } );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__SIGNJAR, SIGN_JAR__KEYSTORE ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Store-Password*:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__SIGNJAR, SIGN_JAR__STOREPASS ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      {
        toolkit.createLabel( sectionClient, "Storetype:" );
        Text t = toolkit.createText( sectionClient, "", SWT.BORDER );
        t.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 3, 1 ) );
        IEMFValueProperty prop = EMFEditProperties.value( editingDomain, FeaturePath.fromList( ANT_TASK__SIGNJAR, SIGN_JAR__STORETYPE ) );
        dbc.bindValue( textModify.observeDelayed( DELAY, t ), prop.observeDetail( bean ) );
      }

      section.setClient( sectionClient );
    }

View Full Code Here

Examples of org.eclipse.jface.databinding.swt.IWidgetValueProperty

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

    IWidgetValueProperty tProp = WidgetProperties.text( SWT.Modify );

    {
      Label l = new Label( container, SWT.NONE );
      l.setText( "Font name*:" );
      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
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.