/** @see org.eclipse.swt.widgets.Widget#dispose() */
 @Override
 public void dispose() {
   listComposite.dispose();
   if (displayTitle) {
     title.dispose();
   }
   super.dispose();
 }
  /** Create the contents in the main composite. */
  protected void createMainContents() {
    if (displayTitle) {
      title = new TalendTabbedPropertyTitle(mainComposite, factory);

      FormData data = new FormData();
      data.left = new FormAttachment(0, 0);
      if (displayCompactToolbar) {
        data.right = new FormAttachment(90, 0);
      } else {
        data.right = new FormAttachment(100, 0);
      }
      data.top = new FormAttachment(0, 0);
      title.setLayoutData(data);

      if (displayCompactToolbar) {
        toolBarComposite = new Composite(mainComposite, SWT.NONE);
        compactButton = new Button(toolBarComposite, SWT.PUSH);
        compactButton.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        compactButton.setToolTipText(
            Messages.getString(
                "TalendTabbedPropertyComposite.compactButton.toolTip")); //$NON-NLS-1$

        tableButton = new Button(toolBarComposite, SWT.PUSH);
        tableButton.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        tableButton.setToolTipText(
            Messages.getString("TalendTabbedPropertyComposite.tableButton.toolTip")); // $NON-NLS-1$

        if (isCompactView()) {
          compactButton.setImage(ImageProvider.getImage(EImage.COMPACT_VIEW));
          tableButton.setImage(ImageProvider.getImage(EImage.NO_TABLE_VIEW));
        } else {
          compactButton.setImage(ImageProvider.getImage(EImage.NO_COMPACT_VIEW));
          tableButton.setImage(ImageProvider.getImage(EImage.TABLE_VIEW));
        }

        Rectangle compactRectangle = compactButton.getBounds();
        tableButton.setBounds(compactRectangle);

        compactButton.setVisible(false);
        tableButton.setVisible(false);

        data = new FormData();
        data.left = new FormAttachment(title, 0);
        data.top = new FormAttachment(0, -5);
        toolBarComposite.setLayoutData(data);
        GridData gridData = new GridData();
        gridData.horizontalAlignment = SWT.RIGHT;
        gridData.verticalAlignment = SWT.TOP;
        compactButton.setData(gridData);
        tableButton.setData(gridData);

        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        layout.horizontalSpacing = 0;
        layout.verticalSpacing = 0;
        layout.makeColumnsEqualWidth = true;
        toolBarComposite.setLayout(layout);
        toolBarComposite.setBackground(title.getBackground());
      }
    }

    leftComposite = factory.createComposite(mainComposite, SWT.NO_FOCUS);
    leftComposite.setLayout(new FormLayout());

    scrolledComposite =
        factory.createScrolledComposite(mainComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
    scrolledComposite.setLayout(new FormLayout());

    FormData formData = new FormData();
    formData.left = new FormAttachment(leftComposite, 0);
    formData.right = new FormAttachment(100, 0);
    if (displayTitle) {
      formData.top = new FormAttachment(title, 0);
    } else {
      formData.top = new FormAttachment(0, 0);
    }
    formData.bottom = new FormAttachment(100, 0);
    scrolledComposite.setLayoutData(formData);

    formData = new FormData();
    formData.left = new FormAttachment(0, 0);
    formData.right = new FormAttachment(scrolledComposite, 0);
    if (displayTitle) {
      formData.top = new FormAttachment(title, 0);
    } else {
      formData.top = new FormAttachment(0, 0);
    }
    formData.bottom = new FormAttachment(100, 0);
    leftComposite.setLayoutData(formData);

    tabComposite = factory.createComposite(scrolledComposite, SWT.NO_FOCUS);
    tabComposite.setLayout(new FormLayout());
    tabComposite.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));

    scrolledComposite.setContent(tabComposite);
    scrolledComposite.setAlwaysShowScrollBars(false);
    scrolledComposite.setExpandVertical(true);
    scrolledComposite.setExpandHorizontal(true);

    listComposite = new TalendTabbedPropertyList(leftComposite, factory);
    formData = new FormData();
    formData.left = new FormAttachment(0, 0);
    formData.right = new FormAttachment(100, 0);
    formData.top = new FormAttachment(0, 0);
    formData.bottom = new FormAttachment(100, 0);
    listComposite.setLayoutData(formData);

    FormData data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, 0);
    data.bottom = new FormAttachment(100, 0);
    tabComposite.setLayoutData(data);
  }