docs: public void init(CmsImagePreviewHandler handler) {
  
          m_handler = handler;
          m_propertiesTab = new CmsPropertiesTab(m_galleryMode, m_dialogHeight, m_dialogWidth, m_handler);
          m_tabbedPanel.add(m_propertiesTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_PROPERTIES_0));
          if ((m_galleryMode == GalleryMode.editor) || (m_galleryMode == GalleryMode.widget)) {
              m_imageFormatTab = new CmsImageFormatsTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler, null);
              m_tabbedPanel.add(m_imageFormatTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEFORMAT_0));
          }
          if (getGalleryMode() == GalleryMode.editor) {
              m_imageEditorFormatsTab = new CmsImageEditorTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler);
  
              String hideFormatsParam = Window.Location.getParameter("hideformats");
              boolean hideFormats = "true".equals(hideFormatsParam);
              if (!hideFormats) {
                  m_tabbedPanel.add(m_imageEditorFormatsTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEOPTIONS_0));
              }
  
              m_imageAdvancedTab = new CmsImageAdvancedTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler);
              if (!hideFormats) {
                  m_tabbedPanel.add(m_imageAdvancedTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEADVANCED_0));
              }
          }
          m_tabbedPanel.addSelectionHandler(new SelectionHandler<Integer>() {
  
              public void onSelection(SelectionEvent<Integer> event) {
  
                  Scheduler.get().scheduleDeferred(new ScheduledCommand() {
  
                      @SuppressWarnings("synthetic-access")
                      public void execute() {
  
                          updateClassForTab(event.getSelectedItem().intValue());
                      }
                  });
  
              }
          });
      }