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

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


  }

  public void createControls(Composite parent,
      TabbedPropertySheetPage aTabbedPropertySheetPage) {
    super.createControls(parent, aTabbedPropertySheetPage);
    TabbedPropertySheetWidgetFactory factory = aTabbedPropertySheetPage
        .getWidgetFactory();
    _group.layoutDialogFields(factory, parent);
  }
View Full Code Here


  @Override
  public void createControls(Composite parent,
      TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);
    TabbedPropertySheetWidgetFactory factory = tabbedPropertySheetPage.getWidgetFactory();
   
    Composite cont = factory.createComposite(parent, SWT.NO_FOCUS);
    GridLayout layout = new GridLayout(1, false);
    cont.setLayout(layout);

    CLabel lbl =
      factory.createCLabel(cont, PDPlugin.getResourceString("QuickEditTab.no_quick_edit_md"));//$NON-NLS-1$
    lbl.setLayoutData(new GridData());   
  }
View Full Code Here

    FormData data;

    customPropertyFields = new ArrayList<CustomPropertyField>();

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();

    if (workParent != null) {
      workParent.dispose();
    }

    workParent = factory.createFlatFormComposite(parent);

    customServiceTasks = ExtensionUtil.getCustomServiceTasks(ActivitiUiUtil.getProjectFromDiagram(getDiagram()));

    final ServiceTask serviceTask = getServiceTask();

    if (serviceTask != null) {

      CustomServiceTask targetTask = null;

      for (final CustomServiceTask customServiceTask : customServiceTasks) {
        if (customServiceTask.getId().equals(serviceTask.getExtensionId())) {
          targetTask = customServiceTask;
          break;
        }
      }

      if (targetTask != null) {

        final List<Class<CustomServiceTask>> classHierarchy = new ArrayList<Class<CustomServiceTask>>();
        final List<FieldInfo> fieldInfoObjects = new ArrayList<FieldInfo>();

        Class clazz = targetTask.getClass();
        classHierarchy.add(clazz);

        boolean hierarchyOpen = true;
        while (hierarchyOpen) {
          clazz = clazz.getSuperclass();
          if (CustomServiceTask.class.isAssignableFrom(clazz)) {
            classHierarchy.add(clazz);
          } else {
            hierarchyOpen = false;
          }
        }

        for (final Class<CustomServiceTask> currentClass : classHierarchy) {
          for (final Field field : currentClass.getDeclaredFields()) {
            if (field.isAnnotationPresent(Property.class)) {
              fieldInfoObjects.add(new FieldInfo(field));
            }
          }
        }

        // Sort the list so the fields are in the correct order
        Collections.sort(fieldInfoObjects);

        Control previousAnchor = workParent;

        final CLabel labelNodeName = factory.createCLabel(workParent, targetTask.getName(), SWT.NONE);
        labelNodeName.setFont(boldFont);
        data = new FormData();
        data.top = new FormAttachment(previousAnchor, VSPACE);
        labelNodeName.setLayoutData(data);

        previousAnchor = labelNodeName;

        if (targetTask.getClass().isAnnotationPresent(Help.class)) {
          final Help helpAnnotation = targetTask.getClass().getAnnotation(Help.class);

          final CLabel labelShort = factory.createCLabel(workParent, helpAnnotation.displayHelpShort(), SWT.WRAP);

          data = new FormData();
          data.top = new FormAttachment(previousAnchor, VSPACE);
          labelShort.setLayoutData(data);
          labelShort.setFont(italicFont);

          previousAnchor = labelShort;

          final CLabel labelLong = factory.createCLabel(workParent, helpAnnotation.displayHelpLong(), SWT.WRAP);
          data = new FormData();
          data.top = new FormAttachment(previousAnchor);
          data.left = new FormAttachment(workParent, HSPACE, SWT.LEFT);
          data.right = new FormAttachment(100, -HSPACE);
          labelLong.setLayoutData(data);

          previousAnchor = labelLong;
        }

        for (final FieldInfo fieldInfo : fieldInfoObjects) {

          final Property property = fieldInfo.getPropertyAnnotation();

          Control createdControl = null;
          CustomPropertyField createdCustomPropertyField = null;

          switch (property.type()) {

          case TEXT:
            createdCustomPropertyField = new CustomPropertyTextField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          case MULTILINE_TEXT:
            createdCustomPropertyField = new CustomPropertyMultilineTextField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            data.height = 80;
            createdControl.setLayoutData(data);
            break;

          case PERIOD:
            createdCustomPropertyField = new CustomPropertyPeriodField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          case BOOLEAN_CHOICE:
            createdCustomPropertyField = new CustomPropertyBooleanChoiceField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          case COMBOBOX_CHOICE:
            createdCustomPropertyField = new CustomPropertyComboboxChoiceField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          case RADIO_CHOICE:
            createdCustomPropertyField = new CustomPropertyRadioChoiceField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          case DATE_PICKER:
            createdCustomPropertyField = new CustomPropertyDatePickerField(this, serviceTask, fieldInfo.getField());
            createdControl = createdCustomPropertyField.render(workParent, factory, listener);
            data = new FormData();
            data.top = new FormAttachment(previousAnchor, VSPACE);
            data.left = new FormAttachment(0, LABEL_COLUMN_WIDTH);
            data.right = new FormAttachment(100, -HELP_COLUMN_WIDTH);
            createdControl.setLayoutData(data);
            break;

          }

          customPropertyFields.add(createdCustomPropertyField);

          previousAnchor = createdControl;

          // Create a label for the field
          String displayName = property.displayName();
          if (StringUtils.isBlank(property.displayName())) {
            displayName = fieldInfo.getFieldName();
          }

          if (property.required()) {
            displayName += PROPERTY_REQUIRED_DISPLAY;
          }

          displayName += ": ";

          final CLabel propertyLabel = factory.createCLabel(workParent, displayName); //$NON-NLS-1$
          data = new FormData();
          data.top = new FormAttachment(createdControl, 0, SWT.TOP);
          data.left = new FormAttachment(0, 0);
          data.right = new FormAttachment(createdControl, -HSPACE);
          propertyLabel.setLayoutData(data);

          // Create a help button for the field
          final Help help = fieldInfo.getHelpAnnotation();
          if (help != null) {
            final Button propertyHelp = factory.createButton(workParent, "", SWT.BUTTON1);
            propertyHelp.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_LCL_LINKTO_HELP));

            // create a tooltip
            final ToolTip tooltip = new FormToolTip(propertyHelp, String.format("Help for field %s",
                    property.displayName().equals("") ? fieldInfo.getFieldName() : property.displayName()), help.displayHelpShort(), help.displayHelpLong());
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 signalComposite = 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);
    signalComposite.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginTop = 0;
    layout.numColumns = 1;
    signalComposite.setLayout(layout);
    signalEditor = new SignalEditor("signalEditor", signalComposite);
    signalEditor.getLabelControl(signalComposite).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
   
    CLabel signalLabel = factory.createCLabel(composite, "Signals:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(signalComposite, -HSPACE);
    data.top = new FormAttachment(signalComposite, 0, SWT.TOP);
    signalLabel.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);
   
    toText = createControl(composite, null, false);
    createLabel(composite, "To:", toText); //$NON-NLS-1$
    fromText = createControl(composite, toText, false);
    createLabel(composite, "From:", fromText); //$NON-NLS-1$
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;
  
    ruleNamesText = 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);
    ruleNamesText.setLayoutData(data);
    ruleNamesText.addFocusListener(listener);

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

    inputVariableNamesText = 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(ruleNamesText, VSPACE);
    inputVariableNamesText.setLayoutData(data);
    inputVariableNamesText.addFocusListener(listener);

    CLabel inputVariableNamesLabel = factory.createCLabel(composite, "Input variables:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(inputVariableNamesText, -HSPACE);
    data.top = new FormAttachment(inputVariableNamesText, 0, SWT.TOP);
    inputVariableNamesLabel.setLayoutData(data);
   
    Composite excludedComposite = factory.createComposite(composite);
    data = new FormData();
    data.left = new FormAttachment(0, 120);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(inputVariableNamesText, VSPACE);
    excludedComposite.setLayoutData(data);
    excludedComposite.setLayout(new RowLayout());
   
    excludedButton = factory.createButton(excludedComposite, "Yes", SWT.RADIO);
    nonExcludedButton = factory.createButton(excludedComposite, "No", SWT.RADIO);

    CLabel excludedLabel = factory.createCLabel(composite, "Excluded:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(excludedComposite, -HSPACE);
    data.top = new FormAttachment(excludedComposite, 0, SWT.TOP);
    excludedLabel.setLayoutData(data);
   
    resultVariableNameText = 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(excludedComposite, VSPACE);
    resultVariableNameText.setLayoutData(data);
    resultVariableNameText.addFocusListener(listener);

    CLabel resultVariableNameLabel = factory.createCLabel(composite, "Result variable:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(resultVariableNameText, -HSPACE);
    data.top = new FormAttachment(resultVariableNameText, 0, SWT.TOP);
    resultVariableNameLabel.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;
   
    Composite messageComposite = 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);
    messageComposite.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginTop = 0;
    layout.numColumns = 1;
   
    messageComposite.setLayout(layout);
    messageEditor = new MessageEditor("messageEditor", messageComposite);
    messageEditor.getLabelControl(messageComposite).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
   
    CLabel messageLabel = factory.createCLabel(composite, "Messages:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(messageComposite, -HSPACE);
    data.top = new FormAttachment(messageComposite, 0, SWT.TOP);
    messageLabel.setLayoutData(data);
View Full Code Here

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

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

    openCalledElementButton = factory.createButton(composite, StringUtils.EMPTY, SWT.PUSH);
    openCalledElementButton.setImage(Activator.getImage(PluginImage.ACTION_GO));
    data = new FormData();
    data.right = new FormAttachment(100, -HSPACE);
    openCalledElementButton.setLayoutData(data);
    openCalledElementButton.addSelectionListener(openCalledElementSelected);

    chooseCalledElementButton = factory.createButton(composite, "\u2026", SWT.PUSH);
    chooseCalledElementButton.setToolTipText(
            "Click to open a dialog to choose from all found processes.");

    data = new FormData();
    data.right = new FormAttachment(openCalledElementButton, -HSPACE);
    chooseCalledElementButton.setLayoutData(data);
    chooseCalledElementButton.addSelectionListener(chooseCalledElementSelected);

    // by default, we set the text field to an empty text. The update() method will deal with this
    calledElementText = factory.createText(composite, ActivitiConstants.EMPTY_STRING);
    data = new FormData();
    data.left = new FormAttachment(0, 150);
    data.right = new FormAttachment(chooseCalledElementButton, -HSPACE);
    data.top = new FormAttachment(0, VSPACE);
    calledElementText.setLayoutData(data);
    calledElementText.addModifyListener(calledElementTextModified);
    calledElementText.addFocusListener(calledElementTextFocusChanged);

    CLabel elementLabel = factory.createCLabel(composite, "Called Element:");
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(calledElementText, -HSPACE);
    data.top = new FormAttachment(calledElementText, 0, SWT.TOP);
    elementLabel.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;

    assigneeText = createText(composite, factory, null);
    createLabel("Assignee:", composite, factory, assigneeText);

    candidateUsersText = createText(composite, factory, assigneeText);
    createLabel("Candidate users (comma separated):", composite, factory, candidateUsersText);

    candidateGroupsText = createText(composite, factory, candidateUsersText);
    createLabel("Candidate groups (comma separated):", composite, factory, candidateGroupsText);

    formKeyText = createText(composite, factory, candidateGroupsText);
    createLabel("Form key:", composite, factory, formKeyText);

    dueDateText = createText(composite, factory, formKeyText);
    createLabel("Due date (variable):", composite, factory, dueDateText);

    priorityText = createText(composite, factory, dueDateText);
    createLabel("Priority:", composite, factory, priorityText);

    documentationText = 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, 250);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(priorityText, VSPACE);
    documentationText.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;
   
    Composite formPropertiesComposite = factory.createComposite(composite, SWT.WRAP);
    data = new FormData();
    data.left = new FormAttachment(0, 150);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    formPropertiesComposite.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginTop = 0;
    layout.numColumns = 1;
    formPropertiesComposite.setLayout(layout);
    formPropertyEditor = new FormPropertyEditor("formPropertyEditor", formPropertiesComposite);
    formPropertyEditor.getLabelControl(formPropertiesComposite).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
   
    CLabel formPropertiesLabel = factory.createCLabel(composite, "Form properties:"); //$NON-NLS-1$
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(formPropertiesComposite, -HSPACE);
    data.top = new FormAttachment(formPropertiesComposite, 0, SWT.TOP);
    formPropertiesLabel.setLayoutData(data);
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.