@Override
    public void layoutComp(SingleRowPassInfo data) {
      if (myTabs.isHideTabs()) {
        myTabs.layoutComp(data, 0, 0, 0, 0);
      }
      else {
        JComponent vToolbar = data.vToolbar.get();
        final int vToolbarWidth = vToolbar != null ? vToolbar.getPreferredSize().width : 0;
        final int vSeparatorWidth = vToolbarWidth > 0 ? myTabs.separatorWidth : 0;
        final int x = vToolbarWidth > 0 ? vToolbarWidth + vSeparatorWidth : 0;
        JComponent hToolbar = data.hToolbar.get();
        JComponent hfToolbar = data.hfToolbar.get();
        final int hToolbarHeight = !myTabs.isSideComponentOnTabs() && hToolbar != null ? hToolbar.getPreferredSize().height : 0;
        final int y = myTabs.getHeaderFitSize().height +
                      (Math.max(hToolbarHeight, 0));

        JComponent comp = data.component.get();
        if (hfToolbar != null && myTabs.isSideComponentOnTabs()) {
          final Rectangle rec = new Rectangle(data.insets.left, data.insets.top,
                                              hfToolbar.getPreferredSize().width,
                                              // reduce toolbar height by 1 pixel to properly paint the border between tabs and the content
                                              myTabs.getHeaderFitSize().height - JBUI.scale(1));
          myTabs.layout(hfToolbar, rec);
        }
        if (hToolbar != null) {
          final Rectangle compBounds = myTabs.layoutComp(x, y, comp, 0, 0);
          if (myTabs.isSideComponentOnTabs()) {
            int toolbarX = (!data.moreRect.isEmpty() ? (int)data.moreRect.getMaxX() : data.position) + myTabs.getToolbarInset();
            final Rectangle rec = new Rectangle(toolbarX, data.insets.top,
                                                myTabs.getSize().width - data.insets.left - toolbarX,
                                                // reduce toolbar height by 1 pixel to properly paint the border between tabs and the content
                                                myTabs.getHeaderFitSize().height - JBUI.scale(1));
            myTabs.layout(hToolbar, rec);
          }
          else {
            final int toolbarHeight = hToolbar.getPreferredSize().height;
            myTabs.layout(hToolbar, compBounds.x, compBounds.y - toolbarHeight, compBounds.width, toolbarHeight);
          }
        }
        else if (vToolbar != null) {
          if (myTabs.isSideComponentBefore()) {
            final Rectangle compBounds = myTabs.layoutComp(x, y, comp, 0, 0);
            myTabs.layout(vToolbar, compBounds.x - vToolbarWidth - vSeparatorWidth, compBounds.y, vToolbarWidth, compBounds.height);
          }
          else {
            int width = vToolbarWidth > 0 ? myTabs.getWidth() - vToolbarWidth - vSeparatorWidth : myTabs.getWidth();
            final Rectangle compBounds = myTabs.layoutComp(new Rectangle(0, y, width, myTabs.getHeight()), comp, 0, 0);
            myTabs.layout(vToolbar, compBounds.x + compBounds.width + vSeparatorWidth, compBounds.y, vToolbarWidth, compBounds.height);
          }
        }
        else {
          myTabs.layoutComp(x, y, comp, 0, 0);
        }
      }
    }
@Override
    public void layoutComp(SingleRowPassInfo data)