code: public void init(CmsImageFormatsForm formatForm, CmsCroppingDialog croppingDialog) {
  
          m_croppingDialog = croppingDialog;
          m_formatForm = formatForm;
          if (m_useFormats) {
              for (Entry<String, I_CmsFormatRestriction> entry : m_formats.entrySet()) {
                  m_formatForm.addFormatSelectOption(entry.getKey(), entry.getValue().getLabel());
              }
              I_CmsFormatRestriction match = getMatchingFormat(m_croppingParam, true);
              if (match != null) {
                  m_currentFormat = match;
                  m_formatForm.setFormatSelectValue(match.getName());
                  adjustToCurrentFormat();
              } else {
                  onResetSize();
              }
          } else {
              m_formatForm.addFormatSelectOption("--", "--");
              m_formatForm.setFormEnabled(m_useFormats);
          }
          if (m_croppingParam.isCropped()) {
              setCropping(m_croppingParam);
          }
          m_croppingDialog.addValueChangeHandler(new ValueChangeHandler<CmsCroppingParamBean>() {
  
              /**
               * Executed on value change. Sets the returned cropping parameters.<p>
               *
               * @param event the value change event
               */
              public void onValueChange(ValueChangeEvent<CmsCroppingParamBean> event) {
  
                  setCropping(event.getValue());
              }
          });
          m_initialized = true;
      }
docs: Initializes the format form handler.<p>
  
  @param formatForm the format form
  @param croppingDialog the cropping dialog