|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.api.SubstanceColorSchemeBundle
public class SubstanceColorSchemeBundle
Color scheme bundle. Defines the visual appearance of a single decoration area of a skin.
DecorationAreaType,
ColorSchemeAssociationKind,
SubstanceSkin| Field Summary | |
|---|---|
protected SubstanceColorScheme |
activeColorScheme
The active color scheme of this bundle. |
protected java.util.Map<ColorSchemeAssociationKind,java.util.Map<ComponentState,SubstanceColorScheme>> |
colorSchemeMap
Maps from color scheme association kinds to the map of color schemes. |
protected SubstanceColorScheme |
defaultColorScheme
The default color scheme of this bundle. |
protected SubstanceColorScheme |
disabledColorScheme
The disabled color scheme of this bundle. |
protected SubstanceColorScheme |
disabledSelectedScheme
If there is no explicitly registered color scheme for the disabled selected component states, this field will contain a synthesized color scheme for the disabled selected state. |
protected SubstanceColorScheme |
pressedScheme
If there is no explicitly registered color scheme for pressed component states, this field will contain a synthesized color scheme for a pressed state. |
protected java.util.Map<ComponentState,java.lang.Float> |
stateAlphaMap
Maps from component state to the alpha channel applied on color scheme. |
protected java.util.Map<ComponentState,java.lang.Float> |
stateHighlightSchemeAlphaMap
Maps from component state to the alpha channel applied on highlight color scheme. |
| Constructor Summary | |
|---|---|
SubstanceColorSchemeBundle(SubstanceColorScheme activeColorScheme,
SubstanceColorScheme defaultColorScheme,
SubstanceColorScheme disabledColorScheme)
Creates a new color scheme bundle. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
clone()
|
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 |
getBorderColorScheme(java.awt.Component comp,
ComponentState componentState)
Deprecated. Use #getColorScheme(Component, ColorSchemeAssociationKind, ComponentState)
with ColorSchemeAssociationKind.BORDER instead. This
method will be removed in version 6.0. |
SubstanceColorScheme |
getColorScheme(ColorSchemeAssociationKind associationKind,
ComponentState componentState)
Returns the color scheme to be used for painting the specified visual area of the component under the specified component state. |
SubstanceColorScheme |
getColorScheme(ComponentState componentState)
Returns the color scheme of the specified component in the specified component state. |
SubstanceColorScheme |
getDefaultColorScheme()
Returns the default color scheme of this bundle. |
SubstanceColorScheme |
getDisabledColorScheme()
Returns the disabled 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. |
SubstanceColorScheme |
getHighlightColorScheme(java.awt.Component comp,
ComponentState componentState)
Deprecated. Use #getColorScheme(Component, ColorSchemeAssociationKind, ComponentState)
with ColorSchemeAssociationKind.HIGHLIGHT instead.
This method will be removed in version 6.0. |
void |
registerBorderColorScheme(SubstanceColorScheme scheme,
ComponentState... states)
Deprecated. Use registerColorScheme(SubstanceColorScheme, ColorSchemeAssociationKind, ComponentState...)
with ColorSchemeAssociationKind.BORDER instead. This
method will be removed in version 6.0. |
void |
registerColorScheme(SubstanceColorScheme scheme,
ColorSchemeAssociationKind associationKind,
ComponentState... states)
Registers the color scheme to be used for the specified visual area of controls under the specified states. |
void |
registerColorScheme(SubstanceColorScheme stateColorScheme,
ComponentState... states)
Registers a color scheme for the specific component state. |
void |
registerColorScheme(SubstanceColorScheme stateColorScheme,
float alpha,
ComponentState... states)
Registers a color scheme for the specific component state. |
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. |
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. |
SubstanceColorSchemeBundle |
transform(ColorSchemeTransform transform)
Creates a new color scheme bundle that has the same settings as this color scheme bundle with the addition of applying the specified color scheme transformation on all the relevant color schemes |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SubstanceColorScheme activeColorScheme
protected SubstanceColorScheme defaultColorScheme
protected SubstanceColorScheme disabledColorScheme
protected java.util.Map<ComponentState,java.lang.Float> stateAlphaMap
ComponentState
instances.
protected java.util.Map<ComponentState,java.lang.Float> stateHighlightSchemeAlphaMap
ComponentState instances.
protected SubstanceColorScheme pressedScheme
protected SubstanceColorScheme disabledSelectedScheme
protected java.util.Map<ColorSchemeAssociationKind,java.util.Map<ComponentState,SubstanceColorScheme>> colorSchemeMap
ColorSchemeAssociationKind.FILL. This entry
has a map entry with key ComponentState.SELECTED and value that
points to the light orange scheme.ColorSchemeAssociationKind.BORDER. This
entry has a map entry with key ComponentState.SELECTED and value
that points to the dark gray scheme.
| Constructor Detail |
|---|
public SubstanceColorSchemeBundle(SubstanceColorScheme activeColorScheme,
SubstanceColorScheme defaultColorScheme,
SubstanceColorScheme disabledColorScheme)
activeColorScheme - The active color scheme of this bundle.defaultColorScheme - The default color scheme of this bundle.disabledColorScheme - The disabled color scheme of this bundle.| Method Detail |
|---|
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,
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)
comp - Component.componentState - Component state.
@Deprecated
public SubstanceColorScheme getHighlightColorScheme(java.awt.Component comp,
ComponentState componentState)
#getColorScheme(Component, ColorSchemeAssociationKind, ComponentState)
with ColorSchemeAssociationKind.HIGHLIGHT instead.
This method will be removed in version 6.0.
comp - Component.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 getDefaultColorScheme()
public SubstanceColorScheme getDisabledColorScheme()
public void registerColorScheme(SubstanceColorScheme scheme,
ColorSchemeAssociationKind associationKind,
ComponentState... states)
scheme=light orange schemeassociationKind=ColorSchemeAssociationKind.FILLstates=ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTED
scheme - 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(ColorSchemeAssociationKind associationKind,
ComponentState componentState)
comp - Component.associationKind - Color scheme association kind.componentState - Component state.
registerColorScheme(SubstanceColorScheme, ComponentState...)
@Deprecated
public void registerBorderColorScheme(SubstanceColorScheme scheme,
ComponentState... states)
registerColorScheme(SubstanceColorScheme, ColorSchemeAssociationKind, ComponentState...)
with ColorSchemeAssociationKind.BORDER instead. This
method will be removed in version 6.0.
null, or a global highlight color
scheme otherwise.
scheme - Border color scheme for the specified component state.states - Component states. If null, the specified color
scheme will be applied for all states left unspecified.
@Deprecated
public SubstanceColorScheme getBorderColorScheme(java.awt.Component comp,
ComponentState componentState)
#getColorScheme(Component, ColorSchemeAssociationKind, ComponentState)
with ColorSchemeAssociationKind.BORDER instead. This
method will be removed in version 6.0.
comp - Component.componentState - Component state.
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic SubstanceColorSchemeBundle transform(ColorSchemeTransform transform)
transform - Color scheme transformation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||