/* (non-Javadoc)
   * @see org.eclipse.ui.internal.skins.StackPresentation#selectPart(org.eclipse.ui.internal.skins.IPresentablePart)
   */
  public void selectPart(IPresentablePart toSelect) {
    if (toSelect == current) {
      return;
    }

    if (current != null) {
      current.setVisible(false);
    }

    current = toSelect;

    if (current != null) {
      tabFolder.setSelection(indexOf(current));
      current.setVisible(true);
      setControlSize();
    }
  }
  /* (non-Javadoc)
   * @see org.eclipse.ui.internal.skins.StackPresentation#removePart(org.eclipse.ui.internal.skins.IPresentablePart)
   */
  public void removePart(IPresentablePart oldPart) {
    TabItem item = getTab(oldPart);
    if (item == null) {
      return;
    }
    oldPart.setVisible(false);

    item.dispose();
  }
 /* (non-Javadoc)
  * @see org.eclipse.ui.internal.skins.Presentation#setVisible(boolean)
  */
 public void setVisible(boolean isVisible) {
   if (current != null) {
     current.setVisible(isVisible);
   }
   tabFolder.setVisible(isVisible);
 }