* @return The color scheme of the specified tabbed pane tab.
*/
public static SubstanceColorScheme getColorScheme(final JTabbedPane jtp,
final int tabIndex, ColorSchemeAssociationKind associationKind,
ComponentState componentState) {
SubstanceSkin skin = SubstanceCoreUtilities.getSkin(jtp);
if (skin == null) {
SubstanceCoreUtilities
.traceSubstanceApiUsage(jtp,
"Substance delegate used when Substance is not the current LAF");
}
SubstanceColorScheme nonColorized = skin.getColorScheme(jtp,
associationKind, componentState);
if (tabIndex >= 0) {
Component component = jtp.getComponentAt(tabIndex);
SubstanceColorScheme colorized = getColorizedScheme(component,
nonColorized, jtp.getForegroundAt(tabIndex), jtp