code: private void initContent(CmsPreviewInfo previewInfo) {
  
          setSitePath(previewInfo.getSitePath());
          HTML content = new HTML();
          Style style = content.getElement().getStyle();
          int height = DIALOG_HEIGHT;
          int width = DIALOG_WIDTH;
          if (previewInfo.hasPreviewContent()) {
              content.setHTML(previewInfo.getPreviewContent());
              style.setOverflow(Overflow.AUTO);
              // try to measure dimensions
              width = DIALOG_PREVIEW_CONTENT_WIDTH;
              style.setWidth(width, Unit.PX);
              RootPanel.get().add(content);
              height = content.getOffsetHeight();
          } else {
              content.setHTML(
                  "<iframe src=\"" + previewInfo.getPreviewUrl() + "\" style=\"height:100%; width:100%;\" />");
          }
          if (previewInfo.hasDimensions()) {
              height = previewInfo.getHeight();
              width = previewInfo.getWidth();
          }
          // check if window is big enough for requested dimensions
          int availableHeight = Window.getClientHeight() - 200;
          if (height > availableHeight) {
              height = availableHeight;
          }
          int availableWidth = Window.getClientWidth() - 50;
          if (width > availableWidth) {
              width = availableWidth;
          }
          style.setHeight(height, Unit.PX);
          style.setWidth(width, Unit.PX);
          setWidth(width + 12);
          setMainContent(content);
      }
docs: Initializes the preview content.<p>
  
  @param previewInfo the preview info