@Override
  public void setCaptionIconPosition(boolean left) {
    if (myCaption instanceof TitlePanel titlePanel) {
      titlePanel.setHorizontalTextPosition(left ? SwingUtilities.RIGHT : SwingUtilities.LEFT);
    }
  }
@Override
  public void setCaptionIconPosition(boolean left)