Package org.eclipse.ui.views.properties.tabbed

Examples of org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory


  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
   
    messageCombo = getWidgetFactory().createCCombo(composite, SWT.NONE);
    FormData data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, -HSPACE);
View Full Code Here


  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;
   
    cancelActivityCombo = factory.createCCombo(composite, SWT.NONE);
    cancelActivityCombo.setItems((String[]) cancelFormats.toArray());
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
View Full Code Here

 
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
   
    timeDurationText = createText(composite, factory, null);
    createLabel(composite, "Time duration", timeDurationText, factory); //$NON-NLS-1$
   
    timeDateText = createText(composite, factory, timeDurationText);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;
   
    Composite listenersComposite = factory.createComposite(composite, SWT.WRAP);
    data = new FormData();
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    listenersComposite.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginTop = 0;
    layout.numColumns = 1;
    listenersComposite.setLayout(layout);
    listenerEditor = new TaskListenerEditor("taskListenerEditor", listenersComposite);
    listenerEditor.getLabelControl(listenersComposite).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
   
    CLabel listenersLabel = factory.createCLabel(composite, "Listeners:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(listenersComposite, -HSPACE);
    data.top = new FormAttachment(listenersComposite, 0, SWT.TOP);
    listenersLabel.setLayoutData(data);
View Full Code Here

  @Override
  public void createControls(Composite parent,
      TabbedPropertySheetPage aTabbedPropertySheetPage) {
    super.createControls(parent, aTabbedPropertySheetPage);
   
    final TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    final Composite composite = factory.createFlatFormComposite(parent);
   
    text = factory.createText(composite, "", SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
   
    FormData data = new FormData(SWT.DEFAULT, 100);
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    text.setLayoutData(data);
    text.addFocusListener(listener);
   
    CLabel textLabel = factory.createCLabel(composite, "Text:");
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(text, -HSPACE);
    data.top = new FormAttachment(text, 0, SWT.TOP);
    textLabel.setLayoutData(data);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    composite = factory.createFlatFormComposite(parent);
    FormData data;

    defaultCombo = getWidgetFactory().createCCombo(composite, SWT.NONE);
    data = new FormData();
    data.left = new FormAttachment(0, 120);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;

    Composite radioTypeComposite = new Composite(composite, SWT.NULL);
    radioTypeComposite.setBackground(composite.getBackground());
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    radioTypeComposite.setLayoutData(data);
    radioTypeComposite.setLayout(new RowLayout());

    classTypeButton = new Button(radioTypeComposite, SWT.RADIO);
    classTypeButton.setText("Java class");
    classTypeButton.setSelection(true);
    classTypeButton.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent event) {
        setVisibleClassType(true);
        setVisibleExpressionType(false);
        setVisibleDelegateExpressionType(false);
        saveImplementationType(ImplementationType.IMPLEMENTATION_TYPE_CLASS);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent event) {
        //
      }

    });
    expressionTypeButton = new Button(radioTypeComposite, SWT.RADIO);
    expressionTypeButton.setText("Expression");
    expressionTypeButton.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent event) {
        setVisibleClassType(false);
        setVisibleExpressionType(true);
        setVisibleDelegateExpressionType(false);
        saveImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent event) {
        //
      }

    });

    delegateExpressionTypeButton = new Button(radioTypeComposite, SWT.RADIO);
    delegateExpressionTypeButton.setText("Delegate expression");
    delegateExpressionTypeButton.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent event) {
        setVisibleClassType(false);
        setVisibleExpressionType(false);
        setVisibleDelegateExpressionType(true);
        saveImplementationType(ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent event) {
        //
      }

    });

    CLabel typeLabel = factory.createCLabel(composite, "Type:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(radioTypeComposite, -HSPACE);
    data.top = new FormAttachment(radioTypeComposite, 0, SWT.TOP);
    typeLabel.setLayoutData(data);

    classNameText = factory.createText(composite, ""); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(70, 0);
    data.top = new FormAttachment(radioTypeComposite, VSPACE);
    classNameText.setEnabled(true);
    classNameText.setLayoutData(data);

    classSelectButton = factory.createButton(composite, "Select class", SWT.PUSH);
    data = new FormData();
    data.left = new FormAttachment(classNameText, 0);
    data.right = new FormAttachment(78, 0);
    data.top = new FormAttachment(classNameText, -2, SWT.TOP);
    classSelectButton.setLayoutData(data);
    classSelectButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent evt) {
        Shell shell = classNameText.getShell();
        try {
          SelectionDialog dialog = JavaUI.createTypeDialog(shell, new ProgressMonitorDialog(shell),
              SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          if (dialog.open() == SelectionDialog.OK) {
            Object[] result = dialog.getResult();
            String className = ((IType) result[0]).getFullyQualifiedName();
            IJavaProject containerProject = ((IType) result[0]).getJavaProject();

            if (className != null) {
              classNameText.setText(className);
            }

            DiagramEditor diagramEditor = (DiagramEditor) getDiagramEditor();
            TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();

            ActivitiUiUtil.runModelChange(new Runnable() {
              @Override
              public void run() {
                Object bo = getBusinessObject(getSelectedPictogramElement());
                if (bo == null) {
                  return;
                }
                String implementationName = classNameText.getText();
                if (implementationName != null) {
                  if (bo instanceof ServiceTask) {
                    ServiceTask serviceTask = (ServiceTask) bo;
                    serviceTask.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_CLASS);
                    serviceTask.setImplementation(implementationName);
                  }
                }
              }
            }, editingDomain, "Model Update");

            IProject currentProject = ActivitiUiUtil.getProjectFromDiagram(getDiagram());

            ActivitiUiUtil.doProjectReferenceChange(currentProject, containerProject, className);
          }
        } catch (Exception ex) {
          ex.printStackTrace();
        }
      }
    });

    classSelectLabel = factory.createCLabel(composite, "Service class:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(classNameText, -HSPACE);
    data.top = new FormAttachment(classNameText, 0, SWT.TOP);
    classSelectLabel.setLayoutData(data);

    expressionText = factory.createText(composite, ""); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(radioTypeComposite, VSPACE);
    expressionText.setVisible(false);
    expressionText.setLayoutData(data);
    expressionText.addFocusListener(listener);

    expressionLabel = factory.createCLabel(composite, "Expression:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(expressionText, -HSPACE);
    data.top = new FormAttachment(expressionText, 0, SWT.TOP);
    expressionLabel.setVisible(false);
    expressionLabel.setLayoutData(data);

    delegateExpressionText = factory.createText(composite, ""); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(radioTypeComposite, VSPACE);
    delegateExpressionText.setVisible(false);
    delegateExpressionText.setLayoutData(data);
    delegateExpressionText.addFocusListener(listener);

    delegateExpressionLabel = factory.createCLabel(composite, "Delegate expression:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(delegateExpressionText, -HSPACE);
    data.top = new FormAttachment(delegateExpressionText, 0, SWT.TOP);
    delegateExpressionLabel.setVisible(false);
    delegateExpressionLabel.setLayoutData(data);

    resultVariableText = factory.createText(composite, ""); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(expressionText, VSPACE);
    resultVariableText.setLayoutData(data);
    resultVariableText.addFocusListener(listener);

    CLabel resultVariableLabel = factory.createCLabel(composite, "Result variable:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(resultVariableText, -HSPACE);
    data.top = new FormAttachment(resultVariableText, 0, SWT.TOP);
    resultVariableLabel.setLayoutData(data);

    Composite extensionsComposite = factory.createComposite(composite, SWT.WRAP);
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(resultVariableText, VSPACE);
    extensionsComposite.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginTop = 0;
    layout.numColumns = 1;
    extensionsComposite.setLayout(layout);
    fieldEditor = new FieldExtensionEditor("fieldEditor", extensionsComposite);
    fieldEditor.getLabelControl(extensionsComposite).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));

    CLabel extensionLabel = factory.createCLabel(composite, "Fields:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(extensionsComposite, -HSPACE);
    data.top = new FormAttachment(extensionsComposite, 0, SWT.TOP);
    extensionLabel.setLayoutData(data);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;

    scriptFormatCombo = factory.createCCombo(composite, SWT.NONE);
    scriptFormatCombo.setItems((String[]) scriptFormats.toArray());
    data = new FormData();
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    scriptFormatCombo.setLayoutData(data);
    scriptFormatCombo.addFocusListener(listener);

    CLabel languageLabel = factory.createCLabel(composite, "Script Language:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(scriptFormatCombo, -HSPACE);
    data.top = new FormAttachment(scriptFormatCombo, 0, SWT.CENTER);
    languageLabel.setLayoutData(data);

    scriptText = factory.createText(composite, "", SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); //$NON-NLS-1$
    data = new FormData(SWT.DEFAULT, 100);
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(scriptFormatCombo, VSPACE);
    scriptText.setLayoutData(data);
    scriptText.addFocusListener(listener);

    CLabel scriptLabel = factory.createCLabel(composite, "Script:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(scriptText, -HSPACE);
    data.top = new FormAttachment(scriptText, 0, SWT.TOP);
    scriptLabel.setLayoutData(data);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;
   
    errorCodeText = factory.createText(composite, ""); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    errorCodeText.setLayoutData(data);
View Full Code Here

  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
   
    cancelActivityCombo = factory.createCCombo(composite, SWT.NONE);
    cancelActivityCombo.setItems((String[]) cancelFormats.toArray());
    FormData data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory

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.