docs: protected void enableMaxHeight() {
  
          // use the window height minus an offset for the window header and some spacing
          int maxHeight = calculateMaxHeight(A_CmsUI.get().getPage().getBrowserWindowHeight());
          m_maxHeightExtension = new CmsMaxHeightExtension(this, maxHeight);
          // only center window for height changes that exceed the maximum height since the last window resize
          // (window resize handler resets this)
          m_maxHeightExtension.addHeightChangeHandler(new CmsMaxHeightExtension.I_HeightChangeHandler() {
  
              @SuppressWarnings("synthetic-access")
              public void onChangeHeight(int height) {
  
                  boolean center = height > m_maxRecordedHeight;
                  m_maxRecordedHeight = Math.max(m_maxRecordedHeight, height);
                  Window wnd = CmsVaadinUtils.getWindow(CmsBasicDialog.this);
                  if ((wnd != null) && center) {
                      wnd.center();
                  }
              }
          });
  
          addDetachListener(new DetachListener() {
  
              private static final long serialVersionUID = 1L;
  
              public void detach(DetachEvent event) {
  
                  if (m_resizeListenerRegistration != null) {
                      m_resizeListenerRegistration.remove();
                      m_resizeListenerRegistration = null;
                  }
              }
          });
  
          m_windowResizeListener = new BrowserWindowResizeListener() {
  
              private static final long serialVersionUID = 1L;
  
              @SuppressWarnings("synthetic-access")
              public void browserWindowResized(BrowserWindowResizeEvent event) {
  
                  m_maxRecordedHeight = Integer.MIN_VALUE;
                  int newHeight = event.getHeight();
                  m_maxHeightExtension.updateMaxHeight(calculateMaxHeight(newHeight));
              }
          };
          m_resizeListenerRegistration = A_CmsUI.get().getPage().addBrowserWindowResizeListener(m_windowResizeListener);
  
      }