Java Code Examples for javax.swing.plaf.synth.SynthConstants#DEFAULT

The following examples show how to use javax.swing.plaf.synth.SynthConstants#DEFAULT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GtkEditorTabCellRenderer.java    From netbeans with Apache License 2.0 6 votes vote down vote up
public void paintInterior(Graphics g, Component c) {
    GtkEditorTabCellRenderer ren = (GtkEditorTabCellRenderer) c;
    Polygon p = getInteriorPolygon(c);
    int state = ren.isSelected() ? ren.isActive() ? SynthConstants.FOCUSED 
            : SynthConstants.SELECTED : SynthConstants.DEFAULT;
    Rectangle bounds = p.getBounds();
    int yDiff = getHeightDifference(ren);
    paintTabBackground(g, 0, state, bounds.x, bounds.y + yDiff, 
            bounds.width, bounds.height - yDiff);
    
    if (!supportsCloseButton((JComponent)c)) {
        return;
    }
    
    paintCloseButton( g, (JComponent)c );
}
 
Example 2
Source File: ToolbarContainer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** Paint bumps to specific Graphics. */
@Override
public void paint (Graphics g) {
    Icon icon = UIManager.getIcon("ToolBar.handleIcon");
    Region region = Region.TOOL_BAR;
    SynthStyleFactory sf = SynthLookAndFeel.getStyleFactory();
    SynthStyle style = sf.getStyle(toolbar, region);
    SynthContext context = new SynthContext(toolbar, region, style, SynthConstants.DEFAULT);

    SynthGraphicsUtils sgu = context.getStyle().getGraphicsUtils(context);
    sgu.paintText(context, g, null, icon, SwingConstants.LEADING, SwingConstants.LEADING, 0, 0, 0, -1, 0);
}
 
Example 3
Source File: State.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 4
Source File: State.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 5
Source File: State.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 6
Source File: State.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 7
Source File: State.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 8
Source File: State.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 9
Source File: State.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuilder sb = new StringBuilder();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        sb.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (sb.length() > 0) sb.append("+");
        sb.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Selected");
    }
    return sb.toString();
}
 
Example 10
Source File: State.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuilder sb = new StringBuilder();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        sb.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (sb.length() > 0) sb.append("+");
        sb.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (sb.length() > 0) sb.append("+");
        sb.append("Selected");
    }
    return sb.toString();
}
 
Example 11
Source File: State.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 12
Source File: State.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 13
Source File: GtkEditorTabCellRenderer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void paintInterior(Graphics g, Component c) {
    GtkEditorTabCellRenderer ren = (GtkEditorTabCellRenderer) c;
    
    Polygon p = getInteriorPolygon(c);
    int state = ren.isSelected() ? ren.isActive() ? SynthConstants.FOCUSED 
            : SynthConstants.SELECTED : SynthConstants.DEFAULT;
    Rectangle bounds = p.getBounds();
    int yDiff = getHeightDifference(ren);
    paintTabBackground(g, 0, state, bounds.x, bounds.y + yDiff, 
            bounds.width, bounds.height - yDiff);
}
 
Example 14
Source File: GtkEditorTabCellRenderer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void paintInterior(Graphics g, Component c) {
    GtkEditorTabCellRenderer ren = (GtkEditorTabCellRenderer) c;
    Polygon p = getInteriorPolygon(c);
    int state = ren.isSelected() ? ren.isActive() ? SynthConstants.FOCUSED 
            : SynthConstants.SELECTED : SynthConstants.DEFAULT;
    Rectangle bounds = p.getBounds();
    int yDiff = getHeightDifference(ren);
    paintTabBackground(g, 0, state, bounds.x, bounds.y + yDiff, 
            bounds.width, bounds.height - yDiff);
}
 
Example 15
Source File: State.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 16
Source File: State.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 17
Source File: State.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 18
Source File: State.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 19
Source File: State.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static String toString(int state) {
    StringBuffer buffer = new StringBuffer();
    if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
        buffer.append("Default");
    }
    if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Disabled");
    }
    if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Enabled");
    }
    if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Focused");
    }
    if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("MouseOver");
    }
    if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Pressed");
    }
    if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
        if (buffer.length() > 0) buffer.append("+");
        buffer.append("Selected");
    }
    return buffer.toString();
}
 
Example 20
Source File: GtkEditorTabCellRenderer.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private static void paintTabBackground (Graphics g, int index, int state,
int x, int y, int w, int h) {
    if (dummyTab == null) {
        dummyTab = new JTabbedPane();
    }
    Region region = Region.TABBED_PANE_TAB;
    if( !(UIManager.getLookAndFeel() instanceof SynthLookAndFeel) ) {
        return; //#215311 - unsupported L&F installed
    }
    SynthLookAndFeel laf = (SynthLookAndFeel) UIManager.getLookAndFeel();
    SynthStyleFactory sf = laf.getStyleFactory();
    SynthStyle style = sf.getStyle(dummyTab, region);
    SynthContext context =
        new SynthContext(dummyTab, region, style, 
            state == SynthConstants.FOCUSED ? SynthConstants.SELECTED : state);
    SynthPainter painter = style.getPainter(context);
    long t1, t2;
    if (state == SynthConstants.DEFAULT) {
        t1 = System.currentTimeMillis();
        painter.paintTabbedPaneTabBackground(context, g, x, y, w, h, index);
        t2 = System.currentTimeMillis();
        if ((t2 - t1) > 200) {
            LOG.log(Level.WARNING, "painter.paintTabbedPaneTabBackground1 takes too long"
            + " x=" + x + " y=" + y + " w=" + w + " h=" + h + " index:" + index
            + " Time=" + (t2 - t1));
        }
    } else {
        BufferedImage bufIm = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2d = bufIm.createGraphics();
        g2d.setBackground(UIManager.getColor("Panel.background"));
        g2d.clearRect(0, 0, w, h);
        t1 = System.currentTimeMillis();
        painter.paintTabbedPaneTabBackground(context, g2d, 0, 0, w, h, index);
        t2 = System.currentTimeMillis();
        if ((t2 - t1) > 200) {
            LOG.log(Level.WARNING, "painter.paintTabbedPaneTabBackground1 takes too long"
            + " x=0" + " y=0" + " w=" + w + " h=" + h + " index:" + index
            + " Time=" + (t2 - t1));
        }
        // differentiate active and selected tabs, active tab made brighter,
        // selected tab darker
        RescaleOp op = state == SynthConstants.FOCUSED 
            ? new RescaleOp(1.08f, 0, null)
            : new RescaleOp(0.96f, 0, null); 
        BufferedImage img = op.filter(bufIm, null);
        g.drawImage(img, x, y, null);
    }

}