final GeneralPath bgShape = createTabShape ( TabShapeType.background, tabPlacement, x, y, w, h, isSelected );
if ( backgroundPainterAt.containsKey ( tabIndex ) && isSelected )
{
final Shape old = GraphicsUtils.intersectClip ( g2d, bgShape );
final Painter bp = backgroundPainterAt.get ( tabIndex );
bp.paint ( g2d, new Rectangle ( x, y, w, h ), tabPane );
GraphicsUtils.restoreClip ( g2d, old );
}
else
{
final Point topPoint = getTopTabBgPoint ( tabPlacement, x, y, w, h );