void (Graphics g) { TabsDrawMode toDrawTabs = isToDrawTabs(); if (toDrawTabs == TabsDrawMode.HIDE) return; Graphics2D g2d = (Graphics2D)g.create(); for (ContentTabLabel each : tabs) { //TODO set borderThickness int borderThickness = JBUIScale.scale(1); Rectangle r = each.getBounds(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if (toDrawTabs == TabsDrawMode.PAINT_ALL) { if (each.isSelected()) { tabPainter.paintSelectedTab(JBTabsPosition.top, g2d, r, borderThickness, each.getTabColor(), ui.window.isActive(), each.isHovered()); } else { tabPainter.paintTab(JBTabsPosition.top, g2d, r, borderThickness, each.getTabColor(), ui.window.isActive(), each.isHovered()); } } } g2d.dispose(); }