void (Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) { if (tabPlacement == RIGHT || myPaintContentBorder) { Rectangle selRect = selectedIndex < 0 ? null : getTabBounds(selectedIndex, calcRect); g.setColor(darkShadow); // Draw unbroken line if tabs are not on RIGHT, OR // selected tab is not in run adjacent to content, OR // selected tab is not visible (SCROLL_TAB_LAYOUT) // if (tabPlacement != RIGHT || selectedIndex < 0 || (selRect.x - 1 > w) || (selRect.y < y || selRect.y > y + h)) { LinePainter2D.paint((Graphics2D)g, x + w - 1, y, x + w - 1, y + h - 1); } else { // Break line to show visual connection to selected tab LinePainter2D.paint((Graphics2D)g, x + w - 1, y, x + w - 1, selRect.y); if (selRect.y + selRect.height < y + h - 2) { LinePainter2D.paint((Graphics2D)g, x + w - 1, selRect.y + selRect.height, x + w - 1, y + h - 2); } } } }