@Override
      public Dimension getPreferredSize() {
        JBViewport parent = (JBViewport)getParent();
        Dimension minimumSize = editorPane.getMinimumSize();
        Insets insets = getInsets();
        int insetWidth = insets.left + insets.right;
        int width = Math.max(Math.max(minimumSize.width, parent.getWidth() - insetWidth), scale(200));
        Dimension editorPaneSize = editorPane.getPackedSize(width, width);
        Dimension locationLabelSize = locationLabel.isVisible() ? locationLabel.getPreferredSize() : new Dimension();
        return new Dimension(width + insetWidth, editorPaneSize.height + locationLabelSize.height + insets.top + insets.bottom);
      }
@Override
      public Dimension getPreferredSize()