public class SubstanceColorSchemeBundle
extends java.lang.Object
| Constructor | Description |
|---|---|
SubstanceColorSchemeBundle(SubstanceColorScheme activeColorScheme,
SubstanceColorScheme enabledColorScheme,
SubstanceColorScheme disabledColorScheme) |
Creates a new color scheme bundle.
|
| Modifier and Type | Method | Description |
|---|---|---|
SubstanceColorScheme |
getActiveColorScheme() |
Returns the active color scheme of this bundle.
|
float |
getAlpha(java.awt.Component comp,
ComponentState componentState) |
Returns the alpha channel of the color scheme of the component.
|
SubstanceColorScheme |
getColorScheme(ComponentState componentState) |
Returns the color scheme of the specified component in the specified
component state.
|
SubstanceColorScheme |
getColorScheme(SubstanceSlices.ColorSchemeAssociationKind associationKind,
ComponentState componentState,
boolean allowFallback) |
Returns the color scheme to be used for painting the specified visual
area of the component under the specified component state.
|
SubstanceColorScheme |
getDisabledColorScheme() |
Returns the disabled color scheme of this bundle.
|
SubstanceColorScheme |
getEnabledColorScheme() |
Returns the enabled color scheme of this bundle.
|
float |
getHighlightAlpha(java.awt.Component comp,
ComponentState componentState) |
Returns the alpha channel of the highlight color scheme of the component.
|
void |
registerColorScheme(SubstanceColorScheme stateColorScheme,
float alpha,
ComponentState... states) |
Registers a color scheme for the specific component state.
|
void |
registerColorScheme(SubstanceColorScheme stateColorScheme,
float alpha,
SubstanceSlices.ColorSchemeAssociationKind associationKind,
ComponentState... states) |
Registers a color scheme for the specific component state.
|
void |
registerColorScheme(SubstanceColorScheme stateColorScheme,
ComponentState... states) |
Registers a color scheme for the specific component state.
|
void |
registerColorScheme(SubstanceColorScheme scheme,
SubstanceSlices.ColorSchemeAssociationKind associationKind,
ComponentState... states) |
Registers the color scheme to be used for the specified visual area of
controls under the specified states.
|
void |
registerHighlightColorScheme(SubstanceColorScheme highlightScheme,
float alpha,
ComponentState... states) |
Registers a highlight color scheme for the specific component state if
the component state is not
null, or a global highlight color
scheme otherwise. |
void |
registerHighlightColorScheme(SubstanceColorScheme stateHighlightScheme,
ComponentState... states) |
Registers a highlight color scheme for the specific component state if
the component state is not
null, or a global highlight color
scheme otherwise. |
public SubstanceColorSchemeBundle(SubstanceColorScheme activeColorScheme, SubstanceColorScheme enabledColorScheme, SubstanceColorScheme disabledColorScheme)
activeColorScheme - The active color scheme of this bundle.enabledColorScheme - The enabled color scheme of this bundle.disabledColorScheme - The disabled color scheme of this bundle.public void registerColorScheme(SubstanceColorScheme stateColorScheme, float alpha, ComponentState... states)
stateColorScheme - Color scheme for the specified component state.alpha - Alpha channel for the color scheme.states - Component states.public void registerColorScheme(SubstanceColorScheme stateColorScheme, float alpha, SubstanceSlices.ColorSchemeAssociationKind associationKind, ComponentState... states)
stateColorScheme - Color scheme for the specified component state.alpha - Alpha channel for the color scheme.associationKind - Color scheme association kind that specifies the visual areas
of controls to be painted with this color scheme.states - Component states.public void registerColorScheme(SubstanceColorScheme stateColorScheme, ComponentState... states)
stateColorScheme - Color scheme for the specified component state.states - Component states.public void registerHighlightColorScheme(SubstanceColorScheme stateHighlightScheme, ComponentState... states)
null, or a global highlight color
scheme otherwise.stateHighlightScheme - Highlight color scheme for the specified component state.states - Component states. If null, the specified color
scheme will be applied for all states left unspecified.public void registerHighlightColorScheme(SubstanceColorScheme highlightScheme, float alpha, ComponentState... states)
null, or a global highlight color
scheme otherwise.highlightScheme - Highlight color scheme for the specified component states.alpha - Alpha channel for the highlight color scheme.states - Component states. If null, the specified color
scheme will be applied for all states left unspecified.public SubstanceColorScheme getColorScheme(ComponentState componentState)
componentState - Component state.public float getHighlightAlpha(java.awt.Component comp,
ComponentState componentState)
comp - Component.componentState - Component state.public float getAlpha(java.awt.Component comp,
ComponentState componentState)
comp - Component.componentState - Component state.public SubstanceColorScheme getActiveColorScheme()
public SubstanceColorScheme getEnabledColorScheme()
public SubstanceColorScheme getDisabledColorScheme()
public void registerColorScheme(SubstanceColorScheme scheme, SubstanceSlices.ColorSchemeAssociationKind associationKind, ComponentState... states)
scheme=light orange schemeassociationKind=SubstanceSlices.ColorSchemeAssociationKind.FILLstates=ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTEDscheme - Color scheme.associationKind - Color scheme association kind that specifies the visual areas
of controls to be painted with this color scheme.states - Component states that further restrict the usage of the
specified color scheme.public SubstanceColorScheme getColorScheme(SubstanceSlices.ColorSchemeAssociationKind associationKind, ComponentState componentState, boolean allowFallback)
associationKind - Color scheme association kind.componentState - Component state.allowFallback - If true, this method will return a color scheme for the fallback
association kind.registerColorScheme(SubstanceColorScheme, ComponentState...)