code: private CommonDialogWindow getWindow(final Long editDistId) {
  
          final SaveDialogCloseListener saveDialogCloseListener;
          String caption;
  
          resetComponents();
          populateDistSetTypeNameCombo();
  
          if (editDistId == null) {
              saveDialogCloseListener = new CreateOnCloseDialogListener();
              caption = i18n.getMessage("caption.create.new", i18n.getMessage("caption.distribution"));
          } else {
              saveDialogCloseListener = new UpdateOnCloseDialogListener(editDistId);
              caption = i18n.getMessage("caption.update", i18n.getMessage("caption.distribution"));
  
              populateValuesOfDistribution(editDistId);
          }
  
          return new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(caption).content(this).layout(formLayout)
                  .i18n(i18n).saveDialogCloseListener(saveDialogCloseListener).buildCommonDialogWindow();
      }
docs: Internal method to create a window to create or update a DistributionSet.
  
  @param editDistId
  if <code>null</code> is provided the window is configured to
  create a DistributionSet otherwise it is configured for
  update.
  @return