void (final MouseEvent e) { if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_PRESSED)) { return; } if (JBTabsImpl.isSelectionClick(e) && myInfo.isEnabled()) { TabInfo selectedInfo = myTabs.getSelectedInfo(); if (selectedInfo != myInfo) { myInfo.setPreviousSelection(selectedInfo); } Component c = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY()); if (c instanceof InplaceButton) { return; } myTabs.select(info, true); JBPopup container = PopupUtil.getPopupContainerFor(TabLabel.this); if (container != null && ClientProperty.isTrue(container.getContent(), MorePopupAware.class)) { container.cancel(); } } else { handlePopup(e); } }