Example #1
0
  @Override
  protected Control createContents(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    POPUP_LAYOUT_FACTORY.applyTo(composite);

    // LAYOUTDATA_GRAB_BOTH.applyTo(composite);
    GridData gd = LAYOUTDATA_GRAB_BOTH.create();

    composite.setLayoutData(gd);
    if (hasTitleArea()) {
      createTitleMenuArea(composite);
      createHorizontalSeparator(composite);
    }
    dialogArea = createDialogArea(composite);
    if (dialogArea.getLayoutData() == null) LAYOUTDATA_GRAB_BOTH.applyTo(composite);

    gd = LAYOUTDATA_GRAB_BOTH.create();
    dialogArea.pack();
    gd.widthHint = dialogArea.getSize().x;
    gd.heightHint = dialogArea.getSize().y;
    dialogArea.setLayoutData(gd);

    if (hasInfoArea()) {
      createHorizontalSeparator(composite);
      createInfoTextArea(composite);
    }
    return composite;
  }