void (SingleRowPassInfo passInfo) { if (myTabs.isMouseInsideTabsArea()) { return; } int offset = -myScrollOffset; for (TabInfo info : passInfo.myVisibleInfos) { final int length = getRequiredLength(info); if (info == myTabs.getSelectedInfo()) { if (offset < 0) { scroll(offset); } else { int maxLength = passInfo.toFitLength - getMoreRectAxisSize(); Insets actionInsets = myTabs.getActionsInsets(); if (myTabs.getEntryPointPreferredSize().width == 0) { maxLength -= myTabs.isHorizontalTabs() ? actionInsets.left + actionInsets.right : actionInsets.top + actionInsets.bottom; } if (!ExperimentalUI.isNewUI() && getStrategy() instanceof SingleRowLayoutStrategy.Vertical) { maxLength -= passInfo.entryPointAxisSize; } if (offset + length > maxLength) { // a left side should always be visible if (length < maxLength) { scroll(offset + length - maxLength); } else { scroll(offset); } } } break; } offset += length; } }