Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.Binding


    setPageComplete(false);
  }

  @Override
  public void createControl(Composite parent) {
    Binding binding;
    Composite top = new Composite(parent, SWT.NONE);
    GridData topData = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.FILL_HORIZONTAL);
    top.setLayoutData(topData);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(top);
View Full Code Here


    setPageComplete(false);
  }

  @Override
  public void createControl(Composite parent) {
    Binding binding;
    Composite top = new Composite(parent, SWT.NONE);
    GridData topData = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.FILL_HORIZONTAL);
    top.setLayoutData(topData);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(top);
View Full Code Here

    setPageComplete(false);
  }

  @Override
  public void createControl(Composite parent) {
    Binding binding;
    Composite top = new Composite(parent, SWT.NONE);
    GridData topData = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.FILL_HORIZONTAL);
    top.setLayoutData(topData);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(top);
View Full Code Here

    setPageComplete(false);
  }

  @Override
  public void createControl(Composite parent) {
    Binding binding;
    Composite top = new Composite(parent, SWT.NONE);
    GridData topData = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.FILL_HORIZONTAL);
    top.setLayoutData(topData);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(top);
View Full Code Here

    setPageComplete(false);
  }

  @Override
  public void createControl(Composite parent) {
    Binding binding;
    Composite top = new Composite(parent, SWT.NONE);
    GridData topData = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.FILL_HORIZONTAL);
    top.setLayoutData(topData);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(top);
View Full Code Here

          container,
          document,
          observingMapping,
          elementName);
   
    Binding classBinding = bindValue(document, observedElement, classComposite.getClassName());
    IObservableValue observedModel = (IObservableValue)classBinding.getModel();
   
    //refresh tableviewer if classname changes
    observedModel.addValueChangeListener(mappingListRefreshChangeListener);
    //calculate Methods for class
    JavaMethodValueChangeListener jmvcl = new JavaMethodValueChangeListener(methodHolder, classComposite);
View Full Code Here

        // delete button
        final Button deleteButton = new Button(container, SWT.PUSH);
        deleteButton.setImage(PortfolioPlugin.image(PortfolioPlugin.IMG_REMOVE));

        // model binding
        final Binding binding = bindings.getBindingContext().bindValue(
                        SWTObservables.observeText(value, SWT.Modify),
                        BeansObservables.observeValue(attribute, "value"), //$NON-NLS-1$
                        new UpdateValueStrategy().setConverter(new ToAttributeObjectConverter(attribute)),
                        new UpdateValueStrategy().setConverter(new ToAttributeStringConverter(attribute)));
View Full Code Here

      l.setText("Source folder");

      Text t = new Text(parent, SWT.BORDER);
      t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      t.setEditable(false);
      final Binding bd = dbc.bindValue(
          WidgetProperties.text().observe(t),
          BeanProperties.value("fragmentRoot").observe(clazz),
          new UpdateValueStrategy(),
          new UpdateValueStrategy().setConverter(new PackageFragmentRootToStringConverter())
      );

      Button b = new Button(parent, SWT.PUSH);
      b.setText("Browse ...");
      b.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          IPackageFragmentRoot root = choosePackageRoot();
          if( root != null ) {
            froot = root;
            clazz.setFragmentRoot(root)
          }
          bd.updateModelToTarget(); //TODO Find out why this is needed
        }
      });
    }

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

      Text t = new Text(parent, SWT.BORDER);
      t.setEditable(false);
      t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      final Binding bd = dbc.bindValue(
          WidgetProperties.text().observe(t),
          BeanProperties.value("packageFragment").observe(clazz),
          new UpdateValueStrategy(),
          new UpdateValueStrategy().setConverter(new PackageFragmentToStringConverter())
      );

      Button b = new Button(parent, SWT.PUSH);
      b.setText("Browse ...");
      b.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          IPackageFragment fragment = choosePackage();
          if( fragment != null ) {
            clazz.setPackageFragment(fragment)
          }
          bd.updateModelToTarget(); //TODO Find out why this is needed
        }
      });
    }

    {
View Full Code Here

      l.setText("Source folder");

      Text t = new Text(parent, SWT.BORDER);
      t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      t.setEditable(false);
      final Binding bd = dbc.bindValue(
          WidgetProperties.text().observe(t),
          BeanProperties.value("fragmentRoot").observe(clazz),
          new UpdateValueStrategy(),
          new UpdateValueStrategy().setConverter(new PackageFragmentRootToStringConverter())
      );

      Button b = new Button(parent, SWT.PUSH);
      b.setText("Browse ...");
      b.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          IPackageFragmentRoot root = choosePackageRoot();
          if( root != null ) {
            froot = root;
            clazz.setFragmentRoot(root)
          }
          bd.updateModelToTarget(); //TODO Find out why this is needed
        }
      });
    }

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

      Text t = new Text(parent, SWT.BORDER);
      t.setEditable(false);
      t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      final Binding bd = dbc.bindValue(
          WidgetProperties.text().observe(t),
          BeanProperties.value("packageFragment").observe(clazz),
          new UpdateValueStrategy(),
          new UpdateValueStrategy().setConverter(new PackageFragmentToStringConverter())
      );

      Button b = new Button(parent, SWT.PUSH);
      b.setText("Browse ...");
      b.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          IPackageFragment fragment = choosePackage();
          if( fragment != null ) {
            clazz.setPackageFragment(fragment)
          }
          bd.updateModelToTarget(); //TODO Find out why this is needed
        }
      });
    }

    {
View Full Code Here

TOP

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

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.