void (TablePassInfo data) { boolean compressible = isCompressible(); boolean showPinnedTabsSeparately = showPinnedTabsSeparately(); int standardLengthToFit = data.moreRect.x - (data.titleRect.x + data.titleRect.width) - myTabs.getActionsInsets().left; if (compressible || showPinnedTabsSeparately) { if (showPinnedTabsSeparately) { List<TabInfo> pinned = ContainerUtil.filter(data.myVisibleInfos, info -> info.isPinned()); calculateCompressibleLengths(pinned, data, standardLengthToFit); List<TabInfo> unpinned = ContainerUtil.filter(data.myVisibleInfos, info -> !info.isPinned()); if (compressible) { Insets insets = myTabs.getActionsInsets(); calculateCompressibleLengths(unpinned, data, pinned.isEmpty() ? standardLengthToFit : standardLengthToFit + data.titleRect.width + myTabs.getEntryPointPreferredSize().width + insets.left + insets.right); } else { calculateRawLengths(unpinned, data); if (getTotalLength(unpinned, data) > standardLengthToFit) { int moreWidth = getMoreRectAxisSize(); int entryPointsWidth = pinned.isEmpty() ? myTabs.getEntryPointPreferredSize().width : 0; data.moreRect.setBounds(data.toFitRec.x + data.toFitRec.width - moreWidth - entryPointsWidth - myTabs.getActionsInsets().right, myTabs.getLayoutInsets().top, moreWidth, myTabs.getHeaderFitSize().height); calculateRawLengths(unpinned, data); } } } else { calculateCompressibleLengths(data.myVisibleInfos, data, standardLengthToFit); } } else {//both scrollable and multi-row calculateRawLengths(data.myVisibleInfos, data); if (getTotalLength(data.myVisibleInfos, data) > standardLengthToFit) { int moreWidth = getMoreRectAxisSize(); data.moreRect.setBounds(data.toFitRec.x + data.toFitRec.width - moreWidth, data.toFitRec.y, moreWidth, myTabs.getHeaderFitSize().height); calculateRawLengths(data.myVisibleInfos, data); } } }