public LayoutPassInfo layoutTable(List<TabInfo> visibleInfos) {
    myTabs.resetLayout(true);
    Rectangle unitedTabArea = null;
    TablePassInfo data = computeLayoutTable(visibleInfos);

    Rectangle rect = new Rectangle(data.moreRect);
    rect.y += myTabs.getBorderThickness();
    myTabs.getMoreToolbar().getComponent().setBounds(rect);

    ActionToolbar entryPointToolbar = myTabs.entryPointToolbar;
    if (entryPointToolbar != null) {
      entryPointToolbar.getComponent().setBounds(data.entryPointRect);
    }
    myTabs.getTitleWrapper().setBounds(data.titleRect);

    Insets insets = myTabs.getLayoutInsets();
    int eachY = insets.top;
    for (TabInfo info : visibleInfos) {
      Rectangle bounds = data.bounds.get(info);
      if (unitedTabArea == null) {
        unitedTabArea = bounds;
      }
      else {
        unitedTabArea = unitedTabArea.union(bounds);
      }
    }

    if (myTabs.getSelectedInfo() != null) {
      final JBTabsImpl.Toolbar selectedToolbar = myTabs.getInfoToToolbar().get(myTabs.getSelectedInfo());

      final int componentY = (unitedTabArea != null ? unitedTabArea.y + unitedTabArea.height : eachY) + (myTabs.isEditorTabs() ? 0 : 2) -
                             myTabs.getLayoutInsets().top;
      if (!myTabs.getHorizontalSide() && selectedToolbar != null && !selectedToolbar.isEmpty()) {
        final int toolbarWidth = selectedToolbar.getPreferredSize().width;
        final int vSeparatorWidth = toolbarWidth > 0 ? myTabs.separatorWidth : 0;
        if (myTabs.isSideComponentBefore()) {
          Rectangle compRect =
            myTabs.layoutComp(toolbarWidth + vSeparatorWidth, componentY, myTabs.getSelectedInfo().getComponent(), 0, 0);
          myTabs.layout(selectedToolbar, compRect.x - toolbarWidth - vSeparatorWidth, compRect.y, toolbarWidth, compRect.height);
        }
        else {
          final int width = myTabs.getWidth() - toolbarWidth - vSeparatorWidth;
          Rectangle compRect = myTabs.layoutComp(new Rectangle(0, componentY, width, myTabs.getHeight()),
                                                 myTabs.getSelectedInfo().getComponent(), 0, 0);
          myTabs.layout(selectedToolbar, compRect.x + compRect.width + vSeparatorWidth, compRect.y, toolbarWidth, compRect.height);
        }
      }
      else {
        myTabs.layoutComp(0, componentY, myTabs.getSelectedInfo().getComponent(), 0, 0);
      }
    }
    if (unitedTabArea != null) {
      data.tabRectangle.setBounds(unitedTabArea);
    }
    lastTableLayout = data;
    return data;
  }
public LayoutPassInfo layoutTable(List<TabInfo> visibleInfos)