@Override
    public void doLayout() {
      Component[] components = getComponents();
      Rectangle r = getBounds();
      for (Component c : components) {
        if (c instanceof JScrollPane) {
          // Main scroll panel: MyScrollPane
          c.setBounds(0, 0, r.width, r.height);
        }
        else if (c instanceof EditorFloatingToolbar){
          // Floating toolbar: EditorFloatingToolbar
          Dimension d = c.getPreferredSize();
          int rightInsets = getVerticalScrollBar().getWidth() + (isMirrored() ? myGutterComponent.getWidth() : 0);
          c.setBounds(r.width - d.width - rightInsets - 20, 20, d.width, d.height);
        } else if (c instanceof JScrollBar) {
          // Vertical scroll bar: JScrollBar
          // do nothing here, MyScrollPaneLayout manages vsb
        } else if (!(c instanceof StickyLinesPanel)) {
          // Status component: NonOpaquePanel
          Dimension d = c.getPreferredSize();
          c.setBounds(r.width - d.width, 0, d.width, d.height);
          MyScrollBar vsb = myVerticalScrollBar;
          if (vsb.getY() != d.height) {
            vsb.setBounds(vsb.getX(), d.height, vsb.getWidth(), vsb.getHeight() - d.height);
          }
        }
      }
    }
@Override
    public void doLayout()