SubstanceColorScheme enabledScheme = schemes.get("Graphite Enabled");
SubstanceColorScheme backgroundScheme = schemes
.get("Graphite Background");
// use the same color scheme for active and enabled controls
SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
enabledScheme, enabledScheme, disabledScheme);
// highlight fill scheme + custom alpha for rollover unselected state
SubstanceColorScheme highlightScheme = schemes.get("Graphite Aqua");
defaultSchemeBundle.registerHighlightColorScheme(highlightScheme,
0.75f, ComponentState.ROLLOVER_UNSELECTED);
defaultSchemeBundle.registerHighlightColorScheme(highlightScheme, 0.9f,
ComponentState.SELECTED);
defaultSchemeBundle.registerHighlightColorScheme(highlightScheme, 1.0f,
ComponentState.ROLLOVER_SELECTED);
defaultSchemeBundle.registerHighlightColorScheme(highlightScheme, 1.0f,
ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
defaultSchemeBundle.registerColorScheme(highlightScheme,
ColorSchemeAssociationKind.BORDER,
ComponentState.ROLLOVER_ARMED,
ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTED);
defaultSchemeBundle.registerColorScheme(highlightScheme,
ColorSchemeAssociationKind.FILL, ComponentState.SELECTED,
ComponentState.ROLLOVER_SELECTED);
// border schemes
SubstanceColorScheme borderScheme = schemes.get("Graphite Border");
SubstanceColorScheme separatorScheme = schemes
.get("Graphite Separator");
defaultSchemeBundle.registerColorScheme(highlightScheme,
ColorSchemeAssociationKind.HIGHLIGHT_BORDER, ComponentState
.getActiveStates());
defaultSchemeBundle.registerColorScheme(borderScheme,
ColorSchemeAssociationKind.BORDER);
defaultSchemeBundle.registerColorScheme(separatorScheme,
ColorSchemeAssociationKind.SEPARATOR);
defaultSchemeBundle.registerColorScheme(borderScheme,
ColorSchemeAssociationKind.MARK);
// text highlight scheme
defaultSchemeBundle.registerColorScheme(highlightScheme,
ColorSchemeAssociationKind.TEXT_HIGHLIGHT,
ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
defaultSchemeBundle.registerColorScheme(highlightScheme,
ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
defaultSchemeBundle.registerColorScheme(disabledScheme, 0.5f,
ComponentState.DISABLED_UNSELECTED);
defaultSchemeBundle.registerColorScheme(selectedDisabledScheme, 0.5f,
ComponentState.DISABLED_SELECTED);
defaultSchemeBundle.registerColorScheme(highlightScheme,
ComponentState.ROLLOVER_SELECTED);
defaultSchemeBundle.registerColorScheme(selectedScheme,
ComponentState.SELECTED);
SubstanceColorScheme tabHighlightScheme = schemes
.get("Graphite Tab Highlight");
defaultSchemeBundle.registerColorScheme(tabHighlightScheme,
ColorSchemeAssociationKind.TAB,
ComponentState.ROLLOVER_SELECTED);
this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
backgroundScheme, DecorationAreaType.NONE);