Rectangle (SingleRowPassInfo data) { Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); Dimension moreToolbarSize = myTabs.getMoreToolbarPreferredSize(); Insets insets = myTabs.getActionsInsets(); if (ExperimentalUI.isNewUI()) { return new Rectangle(data.layoutSize.width - moreToolbarSize.width - entryPointSize.width - insets.right, myTabs.getHeight() - moreToolbarSize.height - data.insets.bottom - insets.bottom, moreToolbarSize.width, moreToolbarSize.height); } else { return new Rectangle(data.layoutSize.width - myTabs.getHeaderFitSize().width, myTabs.getHeight() - moreToolbarSize.height - entryPointSize.height - data.insets.bottom - insets.bottom, myTabs.getHeaderFitSize().width, moreToolbarSize.height); } }