Пример #1
0
 @Test
 public void testGetLineHeight() {
   Text text = new Text(shell, SWT.MULTI);
   // default theme font is 11px
   assertEquals(16, text.getLineHeight());
   text.setFont(Graphics.getFont("Helvetica", 12, SWT.NORMAL));
   assertEquals(14, text.getLineHeight());
   text.setFont(null);
   assertEquals(16, text.getLineHeight());
 }
Пример #2
0
 /**
  * Create this dialog's drop-down list component.
  *
  * @param parent the parent composite
  * @return the drop-down list component
  */
 protected void createDropDownText(Composite parent) {
   // create the list
   text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
   // print the stacktrace in the text field
   try {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     PrintStream ps = new PrintStream(baos);
     detail.printStackTrace(ps);
     if ((detail instanceof SWTError) && (((SWTError) detail).throwable != null)) {
       ps.println("\n*** Stack trace of contained exception ***"); // $NON-NLS-1$
       ((SWTError) detail).throwable.printStackTrace(ps);
     } else if ((detail instanceof SWTException) && (((SWTException) detail).throwable != null)) {
       ps.println("\n*** Stack trace of contained exception ***"); // $NON-NLS-1$
       ((SWTException) detail).throwable.printStackTrace(ps);
     }
     ps.flush();
     baos.flush();
     text.setText(baos.toString());
   } catch (IOException e) {
   }
   GridData data =
       new GridData(
           GridData.HORIZONTAL_ALIGN_FILL
               | GridData.GRAB_HORIZONTAL
               | GridData.VERTICAL_ALIGN_FILL
               | GridData.GRAB_VERTICAL);
   data.heightHint = text.getLineHeight() * TEXT_LINE_COUNT;
   text.setLayoutData(data);
 }
  /**
   * Create this dialog's drop-down list component.
   *
   * @param parent the parent composite
   */
  protected void createDropDownText(Composite parent) {
    // create the list
    text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    text.setFont(parent.getFont());

    // print the stacktrace in the text field
    try {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      PrintStream ps = new PrintStream(baos);
      detail.printStackTrace(ps);
      ps.flush();
      baos.flush();
      text.setText(baos.toString());
    } catch (IOException e) {
    }

    GridData data =
        new GridData(
            GridData.HORIZONTAL_ALIGN_FILL
                | GridData.GRAB_HORIZONTAL
                | GridData.VERTICAL_ALIGN_FILL
                | GridData.GRAB_VERTICAL);
    data.heightHint = text.getLineHeight() * TEXT_LINE_COUNT;
    data.horizontalSpan = 2;
    text.setLayoutData(data);
  }
Пример #4
0
 @Override
 protected Text createText(Composite composite) {
   Text text = new Text(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
   GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
   data.heightHint = 5 * text.getLineHeight();
   data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
   text.setLayoutData(data);
   return text;
 }
Пример #5
0
  // Returns the line we clicked on based on mouse coordinates
  public int getLine(int mouseY) {
    int topLine = m_Text.getTopIndex();
    int lineHeight = m_Text.getLineHeight();
    int screenLine = mouseY / lineHeight;
    int line = topLine + screenLine;

    if (line > m_Text.getLineCount()) return -1;

    return line;
  }
Пример #6
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.jface.fieldassist.IControlContentAdapter#getInsertionBounds(org.eclipse.swt.widgets.Control)
  */
 public Rectangle getInsertionBounds(Control control) {
   Text text = (Text) control;
   Point caretOrigin = text.getCaretLocation();
   // We fudge the y pixels due to problems with getCaretLocation
   // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=52520
   return new Rectangle(
       caretOrigin.x + text.getClientArea().x,
       caretOrigin.y + text.getClientArea().y + 3,
       1,
       text.getLineHeight());
 }
  /*
   * (non-Javadoc)
   *
   * @see
   * org.talend.designer.core.ui.editor.properties.controllers.AbstractElementPropertySectionController#estimateRowSize
   * (org.eclipse.swt.widgets.Composite, org.talend.core.model.process.IElementParameter)
   */
  @Override
  public int estimateRowSize(Composite subComposite, IElementParameter param) {
    if (!estimateInitialized) {
      DecoratedField dField =
          new DecoratedField(
              subComposite,
              SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP,
              new TextControlCreator());
      Text text = (Text) dField.getControl();
      FormData d = (FormData) text.getLayoutData();
      d.height = text.getLineHeight();
      text.getParent().setSize(subComposite.getSize().x, text.getLineHeight());
      Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
      rowSizeByLine = text.getLineHeight();
      dField.getLayoutControl().dispose();
      rowSizeFixed = ITabbedPropertyConstants.VSPACE + (initialSize.y - rowSizeByLine);
      estimateInitialized = true;
    }

    return rowSizeFixed + (rowSizeByLine * param.getNbLines());
  }
Пример #8
0
  protected void iconBarMouseClick(MouseEvent e) {
    // Make sure the text control is properly initialized
    if (m_Text.getLineHeight() == 0) return;

    int topLine = m_Text.getTopIndex();
    int lineHeight = m_Text.getLineHeight();

    int line = (e.y / lineHeight) + topLine;

    // By using the "getBlockByLineNumber" method we get either the start
    // of a block or the block that encloses this line.
    // This means that clicking on the line beneath an expanded block will
    // cause it to collapse. I think that's a nice feature, but if we'd
    // rather
    // not have that happen switch this to getBlockStartsAtLineNumber() and
    // only clicks right on the icon will cause behavior.
    Block block = m_FoldingDoc.getBlockByLineNumber(line);

    if (block == null) return;

    m_FoldingDoc.expandBlock(block, !block.isExpanded());
    m_IconBar.redraw();
  }
Пример #9
0
 protected void showStackTrace(boolean visible) {
   Point windowSize = getShell().getSize();
   Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
   GridData stackTraceGD = ((GridData) errorStackTrace.getLayoutData());
   if (visible) {
     stackTraceGD.heightHint = errorStackTrace.getLineHeight() * STACK_TRACE_LINE_COUNT;
     detailsButton.setText(CompatibleDialogConstants.get().HIDE_DETAILS_LABEL);
     errorStackTrace.setVisible(true);
   } else {
     stackTraceGD.heightHint = 0;
     detailsButton.setText(CompatibleDialogConstants.get().SHOW_DETAILS_LABEL);
     errorStackTrace.setVisible(false);
   }
   Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
   getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
 }
Пример #10
0
  /** Expand/contract all blocks currently on screen */
  public void expandPage(boolean state) {
    // Get all the information about which part of the text window is
    // visible
    int topLine = m_Text.getTopIndex();
    int lineHeight = m_Text.getLineHeight();
    int visibleLines = m_Text.getClientArea().height / lineHeight;
    int lastLine = Math.min(m_Text.getLineCount(), m_Text.getTopIndex() + visibleLines);

    boolean atBottom = (lastLine == m_Text.getLineCount());

    // Start with the first block that starts at topLine or includes
    // topLine.
    Block topBlock = m_FoldingDoc.getBlockByLineNumber(topLine);
    Block bottomBlock = m_FoldingDoc.getBlockByLineNumber(lastLine);

    if (topBlock == null) return;

    // Stop redrawing while we expand/collapse everything then turn it back
    // on
    setRedraw(false);

    // If the lastLine is after the bottom block, use the last block in the
    // document
    if (bottomBlock == null)
      bottomBlock = m_FoldingDoc.getBlock(m_FoldingDoc.getNumberBlocks() - 1);

    int topIndex = topBlock.getIndex();
    int bottomIndex = bottomBlock.getIndex();

    for (int i = topIndex; i <= bottomIndex; i++) {
      Block block = m_FoldingDoc.getBlock(i);
      m_FoldingDoc.expandBlock(block, state);
    }

    // If the selection was set to the bottom before we expanded make sure
    // it stays there after the expansion.
    if (state && atBottom) scrollBottom();

    // Redraw everything
    setRedraw(true);
  }
Пример #11
0
 public int getTextHeight() {
   checkWidget();
   return text.getLineHeight();
 }
Пример #12
0
  protected void paintIcons(PaintEvent e) {
    // Check if we've turned off redraws
    if (m_DrawingDisabled) return;

    GC gc = e.gc;

    Rectangle client = m_IconBar.getClientArea();

    // Make sure the text control is properly initialized
    if (m_Text.getLineHeight() == 0) return;

    // Get all the information about which part of the text window is
    // visible
    int topLine = m_Text.getTopIndex();
    int lineHeight = m_Text.getLineHeight();
    int visibleLines = m_Text.getClientArea().height / lineHeight;
    int lastLine = Math.min(m_Text.getLineCount(), m_Text.getTopIndex() + visibleLines);

    // Start with the first block that starts at topLine or includes
    // topLine.
    Block topBlock = m_FoldingDoc.getBlockByLineNumber(topLine);
    int blockCount = m_FoldingDoc.getNumberBlocks();

    if (topBlock == null) return;

    int blockIndex = topBlock.getIndex();

    int outerSize = 9;
    int innerSize = 6;
    int offset = (outerSize - innerSize) / 2 + 1;

    Color gray = m_IconBar.getDisplay().getSystemColor(SWT.COLOR_GRAY);
    Color black = m_IconBar.getDisplay().getSystemColor(SWT.COLOR_BLACK);

    // Go through each block in turn until we're off the bottom of the
    // screen
    // or at the end of the list of blocks drawing icons
    while (blockIndex != -1 && blockIndex < blockCount) {
      Block block = m_FoldingDoc.getBlock(blockIndex);

      int line = block.getStart();

      // Once we drop off the bottom of the screen we're done
      if (line >= lastLine) break;

      int pos = line - topLine;
      int y = pos * lineHeight + (lineHeight / 2) - (outerSize / 2) - 1;
      int x = 1;

      boolean expanded = block.isExpanded();

      if (block.canExpand()) {
        gc.drawRectangle(x, y, x + outerSize, x + outerSize);

        // Start with a - sign
        int y1 = y + 1 + (outerSize / 2);
        gc.drawLine(x + offset, y1, x + offset + innerSize, y1);

        if (!expanded) {
          // If not expanded turn the - into a +
          int x1 = x + 1 + (outerSize / 2);
          gc.drawLine(x1, y + offset, x1, y + offset + innerSize);
        } else {
          // If expanded draw a line to show what is in the expanded
          // area
          gc.setForeground(gray);
          int x1 = x + 1 + (outerSize / 2);
          int yTop = y + outerSize + 2;
          int yBottom = y + ((block.getSize() - 1) * lineHeight) + (outerSize / 2);
          gc.drawLine(x1, yTop, x1, yBottom);
          gc.drawLine(x1, yBottom, client.width - 1, yBottom);
          gc.setForeground(black);
        }
      }
      blockIndex++;
    }
  }
Пример #13
0
  /*
   * (non-Javadoc)
   *
   * @see
   * org.talend.designer.core.ui.editor.properties2.editors.AbstractElementPropertySectionController#createControl()
   */
  @Override
  public Control createControl(
      final Composite subComposite,
      final IElementParameter param,
      final int numInRow,
      final int nbInRow,
      final int top,
      final Control lastControl) {
    this.curParameter = param;
    this.paramFieldType = param.getFieldType();
    int nbLines = param.getNbLines();

    DecoratedField dField =
        new DecoratedField(
            subComposite,
            SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP,
            new SelectAllTextControlCreator());
    if (param.isRequired()) {
      FieldDecoration decoration =
          FieldDecorationRegistry.getDefault()
              .getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
      dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.TOP, false);
    }
    Control cLayout = dField.getLayoutControl();
    Text text = (Text) dField.getControl();

    editionControlHelper.register(param.getName(), text);

    FormData d = (FormData) text.getLayoutData();
    if (getAdditionalHeightSize() != 0) {
      nbLines += this.getAdditionalHeightSize() / text.getLineHeight();
    }
    d.height = text.getLineHeight() * nbLines;
    FormData data;
    text.getParent().setSize(subComposite.getSize().x, text.getLineHeight() * nbLines);
    cLayout.setBackground(subComposite.getBackground());
    // for bug 7580
    if (!(text instanceof Text)) {
      text.setEnabled(!param.isReadOnly());
    } else {
      text.setEditable(!param.isReadOnly());
    }
    IPreferenceStore preferenceStore = CorePlugin.getDefault().getPreferenceStore();
    String fontType = preferenceStore.getString(TalendDesignerPrefConstants.MEMO_TEXT_FONT);
    FontData fontData = new FontData(fontType);
    Font font = new Font(null, fontData);
    addResourceDisposeListener(text, font);
    text.setFont(font);
    if (elem instanceof Node) {
      text.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());
    }
    addDragAndDropTarget(text);

    CLabel labelLabel = getWidgetFactory().createCLabel(subComposite, param.getDisplayName());
    data = new FormData();
    if (lastControl != null) {
      data.left = new FormAttachment(lastControl, 0);
    } else {
      data.left = new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow), 0);
    }
    data.top = new FormAttachment(0, top);
    labelLabel.setLayoutData(data);
    if (numInRow != 1) {
      labelLabel.setAlignment(SWT.RIGHT);
    }
    // *********************
    data = new FormData();
    int currentLabelWidth = STANDARD_LABEL_WIDTH;
    GC gc = new GC(labelLabel);
    Point labelSize = gc.stringExtent(param.getDisplayName());
    gc.dispose();

    if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {
      currentLabelWidth = labelSize.x + ITabbedPropertyConstants.HSPACE;
    }

    if (numInRow == 1) {
      if (lastControl != null) {
        data.left = new FormAttachment(lastControl, currentLabelWidth);
      } else {
        data.left = new FormAttachment(0, currentLabelWidth);
      }

    } else {
      data.left = new FormAttachment(labelLabel, 0, SWT.RIGHT);
    }
    data.right = new FormAttachment((numInRow * MAX_PERCENT) / nbInRow, 0);
    data.top = new FormAttachment(0, top);
    cLayout.setLayoutData(data);
    // **********************
    hashCurControls.put(param.getName(), text);

    Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);
    return null;
  }
Пример #14
0
  /**
   * Constructor to create an editor to update/create an ontology entry
   *
   * @param display - points back to the display
   * @param oureditOntEntry - the entry being edited
   * @param ontParent - the edited item's parent in the hierarchy
   * @param newItem - true if this is a new item
   */
  public EditOntEntry(
      Display display, OntEntry oureditOntEntry, OntEntry ontParent, boolean newItem) {
    super();
    shell = new Shell(display, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL);
    shell.setText("OntEntry Information");
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 3;
    gridLayout.marginHeight = 5;
    gridLayout.makeColumnsEqualWidth = true;
    shell.setLayout(gridLayout);

    ourOntEntry = oureditOntEntry;
    ourParent = ontParent;

    if (newItem) {
      ourOntEntry.setName("");
      ourOntEntry.setImportance(Importance.MODERATE);
    }

    new Label(shell, SWT.NONE).setText("Name:");

    nameField = new Text(shell, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL);
    nameField.setText(ourOntEntry.getName());
    GridData gridData =
        new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
    DisplayUtilities.setTextDimensions(nameField, gridData, 75);
    gridData.horizontalSpan = 2;
    nameField.setLayoutData(gridData);

    new Label(shell, SWT.NONE).setText("Description:");

    descArea = new Text(shell, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
    descArea.setText(ourOntEntry.getDescription());
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    DisplayUtilities.setTextDimensions(descArea, gridData, 75, 5);
    gridData.horizontalSpan = 2;
    gridData.heightHint = descArea.getLineHeight() * 3;
    descArea.setLayoutData(gridData);

    new Label(shell, SWT.NONE).setText("Importance:");
    importanceBox = new Combo(shell, SWT.DROP_DOWN | SWT.READ_ONLY);
    Enumeration impEnum = Importance.elements();
    int l = 0;
    Importance itype;
    while (impEnum.hasMoreElements()) {
      itype = (Importance) impEnum.nextElement();
      importanceBox.add(itype.toString());
      if (itype.toString().compareTo(ourOntEntry.getImportance().toString()) == 0) {
        importanceBox.select(l);
      }
      l++;
    }
    // Error checking: if no such selection is valid, set it to select index 0
    if (importanceBox.getSelectionIndex() == -1) {
      importanceBox.select(0);
    }
    importanceBox.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

    new Label(shell, SWT.NONE).setText(" ");
    new Label(shell, SWT.NONE).setText(" ");

    addButton = new Button(shell, SWT.PUSH);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
    addButton.setLayoutData(gridData);
    if (newItem) {
      addButton.setText("Add");
      addButton.addSelectionListener(
          new SelectionAdapter() {

            public void widgetSelected(SelectionEvent event) {
              canceled = false;
              if (!nameField.getText().trim().equals("")) {
                ConsistencyChecker checker =
                    new ConsistencyChecker(ourOntEntry.getID(), nameField.getText(), "OntEntries");

                if (ourOntEntry.getName() == nameField.getText() || checker.check()) {
                  ourParent.addChild(ourOntEntry);
                  ourOntEntry.setLevel(ourParent.getLevel() + 1);
                  ourOntEntry.setName(nameField.getText());
                  ourOntEntry.setDescription(descArea.getText());
                  ourOntEntry.setImportance(
                      Importance.fromString(
                          importanceBox.getItem(importanceBox.getSelectionIndex())));

                  // comment before this made no sense...
                  ourOntEntry.setID(ourOntEntry.toDatabase(ourParent.getID()));
                  System.out.println("Name of added item = " + ourOntEntry.getName());

                  shell.close();
                  shell.dispose();
                }
              } else {
                MessageBox mbox = new MessageBox(shell, SWT.ICON_ERROR);
                mbox.setMessage("Need to provide the OntEntry name");
                mbox.open();
              }
            }
          });

    } else {
      addButton.setText("Save");
      addButton.addSelectionListener(
          new SelectionAdapter() {

            public void widgetSelected(SelectionEvent event) {
              canceled = false;

              ConsistencyChecker checker =
                  new ConsistencyChecker(ourOntEntry.getID(), nameField.getText(), "OntEntries");

              if (ourOntEntry.getName() == nameField.getText() || checker.check()) {
                ourOntEntry.setName(nameField.getText());
                ourOntEntry.setDescription(descArea.getText());
                ourOntEntry.setImportance(
                    Importance.fromString(
                        importanceBox.getItem(importanceBox.getSelectionIndex())));
                // since this is a save, not an add, the type and parent are ignored
                ourOntEntry.setID(ourOntEntry.toDatabase(0));

                //			RationaleDB db = RationaleDB.getHandle();
                //			db.addOntEntry(ourOntEntry);

                shell.close();
                shell.dispose();
              }
            }
          });
    }

    cancelButton = new Button(shell, SWT.PUSH);
    cancelButton.setText("Cancel");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
    cancelButton.setLayoutData(gridData);
    cancelButton.addSelectionListener(
        new SelectionAdapter() {

          public void widgetSelected(SelectionEvent event) {
            canceled = true;
            shell.close();
            shell.dispose();
          }
        });

    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) display.sleep();
    }
  }
  /**
   * method createBasicParameters
   *
   * @param aToolkit
   * @param aComposite
   */
  private void createBasicParameters(FormToolkit aToolkit, Composite aComposite) {

    // Basic parameters section
    final Section basicSection =
        aToolkit.createSection(
            aComposite,
            Section.DESCRIPTION
                | ExpandableComposite.TITLE_BAR
                | ExpandableComposite.TWISTIE
                | ExpandableComposite.EXPANDED);
    final GridData basicSectionGridData = new GridData(GridData.FILL, GridData.FILL, true, false);
    basicSectionGridData.horizontalSpan = 4;
    basicSection.setLayoutData(basicSectionGridData);
    basicSection.setText(R4EUIConstants.BASIC_PARAMS_HEADER);
    basicSection.setDescription(R4EUIConstants.BASIC_PARAMS_HEADER_DETAILS + PARTICIPANT_LABEL);
    basicSection.addExpansionListener(
        new ExpansionAdapter() {
          @Override
          public void expansionStateChanged(ExpansionEvent e) {
            getShell().setSize(getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT));
          }
        });

    final Composite basicSectionClient = aToolkit.createComposite(basicSection);
    final GridLayout layout = new GridLayout(4, false);
    basicSectionClient.setLayout(layout);
    basicSection.setClient(basicSectionClient);

    // Participant Id
    Label label = aToolkit.createLabel(basicSectionClient, R4EUIConstants.ID_LABEL);
    label.setToolTipText(R4EUIConstants.PARTICIPANT_ID_TOOLTIP);
    label.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
    aToolkit.setBorderStyle(SWT.NULL);
    fParticipantIdInputTextField = aToolkit.createText(basicSectionClient, "");
    GridData textGridData = new GridData(GridData.FILL, GridData.FILL, true, false);
    textGridData.horizontalSpan = 3;
    fParticipantIdInputTextField.setEnabled(false);
    fParticipantIdInputTextField.setEditable(false);
    fParticipantIdInputTextField.setToolTipText(R4EUIConstants.PARTICIPANT_ID_TOOLTIP);
    fParticipantIdInputTextField.setLayoutData(textGridData);

    // Participant Email
    label = aToolkit.createLabel(basicSectionClient, R4EUIConstants.EMAIL_LABEL);
    label.setToolTipText(R4EUIConstants.PARTICIPANT_EMAIL_TOOLTIP);
    label.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
    aToolkit.setBorderStyle(SWT.BORDER);
    fParticipantEmailInputTextField = aToolkit.createText(basicSectionClient, "", SWT.SINGLE);
    textGridData = new GridData(GridData.FILL, GridData.FILL, true, false);
    textGridData.horizontalSpan = 3;
    fParticipantEmailInputTextField.setToolTipText(R4EUIConstants.PARTICIPANT_EMAIL_TOOLTIP);
    fParticipantEmailInputTextField.setLayoutData(textGridData);
    fParticipantEmailInputTextField.setEnabled(false);
    fParticipantEmailInputTextField.addListener(
        SWT.FocusOut,
        new Listener() {
          public void handleEvent(Event event) {
            if (fSelectedParticipantIndex >= 0) {
              final R4EParticipant participant = fParticipants.get(fSelectedParticipantIndex);
              participant.setEmail(fParticipantEmailInputTextField.getText().trim());
              final TableItem item = fAddedParticipantsTable.getItem(fSelectedParticipantIndex);
              if (null != participant.getEmail()) {
                item.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
                item.setText(1, participant.getEmail());
              } else {
                item.setFont(
                    JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT));
              }
            }
          }
        });

    // User details
    label = aToolkit.createLabel(basicSectionClient, R4EUIConstants.USER_DETAILS_LABEL);
    label.setToolTipText(R4EUIConstants.PARTICIPANT_DETAILS_TOOLTIP);
    label.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
    aToolkit.setBorderStyle(SWT.NULL);
    fParticipantDetailsInputTextField =
        aToolkit.createText(basicSectionClient, "", SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY);
    textGridData = new GridData(GridData.FILL, GridData.FILL, true, false);
    textGridData.horizontalSpan = 3;
    textGridData.heightHint = fParticipantDetailsInputTextField.getLineHeight() << 3;
    fParticipantDetailsInputTextField.setEnabled(false);
    fParticipantDetailsInputTextField.setEditable(false);
    fParticipantDetailsInputTextField.setToolTipText(R4EUIConstants.PARTICIPANT_DETAILS_TOOLTIP);
    fParticipantDetailsInputTextField.setLayoutData(textGridData);
  }
    /**
     * @see
     *     org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
     * @since 5.5.3
     */
    @Override
    protected Control createDialogArea(Composite parent) {
      Composite pnlOuter = (Composite) super.createDialogArea(parent);

      Composite panel = new Composite(pnlOuter, SWT.NONE);
      GridLayout gridLayout = new GridLayout();
      gridLayout.marginLeft = 20;
      gridLayout.marginRight = 20;
      panel.setLayout(gridLayout);
      panel.setLayoutData(new GridData(GridData.FILL_BOTH));

      // set title
      setTitle(Messages.selectProcedureTypeDialogSubTitle);

      { // simple procedure
        procedureRB = new Button(panel, SWT.RADIO);
        procedureRB.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
        procedureRB.setText(Messages.procedureLabel);
        procedureRB.addSelectionListener(
            new SelectionAdapter() {
              /**
               * {@inheritDoc}
               *
               * @see
               *     org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
               */
              @Override
              public void widgetSelected(SelectionEvent e) {
                handleInfoChanged();
              }
            });
        procedureRB.setSelection(!relationalProcedure.isFunction());

        Text descText = new Text(panel, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
        descText.setBackground(parent.getBackground());
        descText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
        descText.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
        ((GridData) descText.getLayoutData()).horizontalIndent = 20;
        ((GridData) descText.getLayoutData()).heightHint = (3 * descText.getLineHeight());
        descText.setText(Messages.createRelationalViewProcedureDescription);
      }

      { // user defined function
        userDefinedFunctionRB = new Button(panel, SWT.RADIO);
        userDefinedFunctionRB.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
        userDefinedFunctionRB.setText(Messages.userDefinedFunctionLabel);
        userDefinedFunctionRB.addSelectionListener(
            new SelectionAdapter() {
              /**
               * {@inheritDoc}
               *
               * @see
               *     org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
               */
              @Override
              public void widgetSelected(SelectionEvent e) {
                handleInfoChanged();
              }
            });

        Text descText = new Text(panel, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
        descText.setBackground(parent.getBackground());
        descText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
        descText.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
        ((GridData) descText.getLayoutData()).horizontalIndent = 20;
        ((GridData) descText.getLayoutData()).heightHint = (3 * descText.getLineHeight());
        descText.setText(Messages.createRelationalViewUserDefinedFunctionDescription);
      }
      return pnlOuter;
    }