code: public void updateSizeForTab(A_CmsTab tab) {
  
          if (tab == m_resultsTab) {
              m_resultsTab.updateListSize();
          }
          if (!m_previewVisible) {
              int height = tab.getRequiredHeight() + 42;
              int availableHeight = CmsToolbarPopup.getAvailableHeight();
              setDialogSize(m_width, height < availableHeight ? height : availableHeight);
              tab.onResize();
          }
      }
docs: Updates the dialog size according to the requirements of the selected tab.<p>
  
  @param tab the selected tab