code: public void useMaxDimensions() {
  
          int availableHeight = CmsToolbarPopup.getAvailableHeight();
          int availableWidth = CmsToolbarPopup.getAvailableWidth();
          setDialogSize(availableWidth, availableHeight);
      }
docs: Sets the dialog to use the maximum available space.<p>