|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.theme.SubstanceTheme
org.jvnet.substance.theme.SubstanceComplexTheme
public class SubstanceComplexTheme
Complex theme. A complex theme is defined by four separate themes:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jvnet.substance.theme.SubstanceTheme |
|---|
SubstanceTheme.ThemeKind |
| Field Summary | |
|---|---|
protected SubstanceTheme |
activeTheme
Theme for controls in active visual state. |
protected SubstanceTheme |
activeTitlePaneTheme
Theme for title panes of active windows. |
protected java.util.Set<DecorationAreaType> |
decoratedAreaSet
|
protected java.util.Map<DecorationAreaType,SubstanceTheme> |
decorationThemeMap
|
protected SubstanceTheme |
defaultTheme
Theme for controls in default visual state. |
protected SubstanceTheme |
defaultTitlePaneTheme
Theme for title panes of inactive windows. |
protected SubstanceTheme |
disabledTheme
Theme for controls in disabled visual state. |
protected boolean |
isPaintingToolbarDropShadows
|
protected SubstanceGradientPainter |
nonActivePainter
Painter for painting the non-active controls. |
protected double |
selectedTabFadeEnd
The end of fade effect on the selected tabs in JTabbedPanes. |
protected double |
selectedTabFadeStart
The start of fade effect on the selected tabs in JTabbedPanes. |
protected java.util.Map<ComponentState,java.lang.Float> |
stateHighlightThemeAlphaMap
Maps from component state to the alpha channel applied on highlight theme. |
protected java.util.Map<ComponentState,SubstanceTheme> |
stateHighlightThemeMap
Maps from component state to the matching themes for highlight themes. |
protected java.util.Map<ComponentState,java.lang.Float> |
stateThemeAlphaMap
Maps from component state to the alpha channel applied on theme. |
protected java.util.Map<ComponentState,SubstanceTheme> |
stateThemeMap
Maps from component state to the matching themes. |
protected java.util.Set<DecorationAreaType> |
toUseDecorationOnActiveControls
|
protected boolean |
useSameBackgroundColor
If true, the light background color and the background
color are the same. |
protected SubstanceTheme |
watermarkTheme
Theme for watermarks. |
| Fields inherited from class org.jvnet.substance.theme.SubstanceTheme |
|---|
AQUA, GREEN, ORANGE, YELLOW |
| Constructor Summary | |
|---|---|
SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme)
Creates a new complex theme. |
|
SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme,
SubstanceTheme activeTitlePaneTheme)
Creates a new complex theme. |
|
SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme,
SubstanceTheme activeTitlePaneTheme,
SubstanceTheme watermarkTheme)
Creates a new complex theme. |
|
| Method Summary | |
|---|---|
protected void |
copyTo(SubstanceComplexTheme dst,
ThemeTransform shiftTransform)
Copies theme-agnostic settings of this theme to the
specified theme. |
SubstanceTheme |
deuteranopia()
Creates a new version of this theme that simulates the
deuteranopia color blindness. |
SubstanceTheme |
getActiveTheme()
Returns the active theme that corresponds to this theme. |
SubstanceTheme |
getActiveTitlePaneTheme()
Returns the theme for title panes of active frames. |
SubstanceTheme |
getDecorationTheme(DecorationAreaType decorationType)
|
SubstanceTheme |
getDefaultTheme()
Returns the default theme that corresponds to this theme. |
SubstanceTheme |
getDefaultTitlePaneTheme()
Returns the theme for title panes of inactive frames. |
SubstanceTheme |
getDisabledTheme()
Returns the disabled theme that corresponds to this theme. |
SubstanceTheme |
getFirstTheme()
Returns the first theme. |
SubstanceTheme |
getHighlightTheme(java.awt.Component comp,
ComponentState componentState)
Returns the highlight theme that corresponds to the specified component state. |
float |
getHighlightThemeAlpha(java.awt.Component comp,
ComponentState componentState)
Returns the alpha channel that is applied on highlight theme when a component is in the specified state. |
java.awt.Color |
getLightBackgroundColor()
Returns the light background color for this theme. |
SubstanceGradientPainter |
getNonActivePainter()
Returns the painter for painting the non-active controls. |
SubstanceTheme |
getSecondTheme()
Returns the second theme. |
double |
getSelectedTabFadeEnd()
Returns the end of fade effect on the selected tabs in JTabbedPanes. |
double |
getSelectedTabFadeStart()
Returns the start of fade effect on the selected tabs in JTabbedPanes. |
SubstanceTheme |
getTheme(java.awt.Component comp,
ComponentState componentState)
Returns the theme that corresponds to the specified component state. |
SubstanceTheme |
getTheme(java.awt.Component comp,
ComponentState componentState,
boolean toIgnoreHighlights)
|
float |
getThemeAlpha(java.awt.Component comp,
ComponentState componentState)
Returns the alpha channel that is applied on theme when a component is in the specified state. |
SubstanceTheme |
getWatermarkTheme()
Returns the theme for watermark painting. |
SubstanceTheme |
hueShift(double hueShiftFactor)
Creates a hue-shifted (in HSB space) version of this
theme. |
SubstanceTheme |
invert()
Creates an inverted version of this theme. |
boolean |
isPaintingToolbarDropShadows()
|
SubstanceTheme |
negate()
Creates a negated version of this theme. |
SubstanceTheme |
protanopia()
Creates a new version of this theme that simulates the
protanopia color blindness. |
void |
registerComponentHighlightStateTheme(SubstanceTheme stateHighlightTheme,
ComponentState... states)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
registerComponentHighlightStateTheme(SubstanceTheme stateHighlightTheme,
float alpha,
ComponentState... states)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
registerComponentStateTheme(SubstanceTheme stateTheme,
boolean useForHighlights,
ComponentState... states)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
registerComponentStateTheme(SubstanceTheme stateTheme,
float alpha,
boolean useForHighlights,
ComponentState... states)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
registerDecorationAreaTheme(SubstanceTheme decorationTheme,
boolean toUseOnActiveControls,
DecorationAreaType... areaTypes)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
SubstanceTheme |
saturate(double saturateFactor,
boolean toSaturateEverything)
Creates a saturated or desaturated version of this theme. |
void |
setActiveTheme(SubstanceTheme activeTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setActiveTitlePaneTheme(SubstanceTheme activeTitlePaneTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setDefaultTheme(SubstanceTheme defaultTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setDefaultTitlePaneTheme(SubstanceTheme defaultTitlePaneTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setDisabledTheme(SubstanceTheme disabledTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setNonActivePainter(SubstanceGradientPainter nonActivePainter)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setPaintingToolbarDropShadows()
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setSelectedTabFadeEnd(double selectedTabFadeEnd)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setSelectedTabFadeStart(double selectedTabFadeStart)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setUseSameBackgroundColor(boolean useSameBackgroundColor)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
void |
setWatermarkTheme(SubstanceTheme watermarkTheme)
Deprecated. This functionality will be moved to the base skin class in version 5.0. |
SubstanceTheme |
shade(double shadeFactor)
Creates a shaded (shifted towards black) version of this
theme. |
SubstanceTheme |
shift(java.awt.Color backgroundShiftColor,
double backgroundShiftFactor,
java.awt.Color foregroundShiftColor,
double foregroundShiftFactor)
Creates a shift version of this theme. |
SubstanceTheme |
tint(double tintFactor)
Creates a tinted (shifted towards white) version of this
theme. |
SubstanceTheme |
tone(double toneFactor)
Creates a toned (shifted towards gray) version of this
theme. |
boolean |
toUseDecorationPainter(DecorationAreaType decorationType)
|
boolean |
toUseDecorationThemeOnActiveControls(DecorationAreaType decorationType)
|
SubstanceTheme |
tritanopia()
Creates a new version of this theme that simulates the
tritanopia color blindness. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SubstanceTheme activeTheme
protected SubstanceTheme defaultTheme
protected SubstanceTheme disabledTheme
protected SubstanceTheme activeTitlePaneTheme
protected SubstanceTheme defaultTitlePaneTheme
protected SubstanceTheme watermarkTheme
protected java.util.Map<ComponentState,SubstanceTheme> stateThemeMap
ComponentState instances.
protected java.util.Map<ComponentState,java.lang.Float> stateThemeAlphaMap
ComponentState instances.
protected java.util.Map<ComponentState,SubstanceTheme> stateHighlightThemeMap
ComponentState
instances.
protected java.util.Map<ComponentState,java.lang.Float> stateHighlightThemeAlphaMap
ComponentState instances.
protected java.util.Map<DecorationAreaType,SubstanceTheme> decorationThemeMap
protected java.util.Set<DecorationAreaType> decoratedAreaSet
protected java.util.Set<DecorationAreaType> toUseDecorationOnActiveControls
protected SubstanceGradientPainter nonActivePainter
protected double selectedTabFadeStart
JTabbedPanes.
selectedTabFadeEndprotected double selectedTabFadeEnd
JTabbedPanes.
selectedTabFadeStartprotected boolean isPaintingToolbarDropShadows
protected boolean useSameBackgroundColor
true, the light background color and the background
color are the same.
| Constructor Detail |
|---|
public SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme)
displayName - Theme display name.themeKind - Theme kind.activeTheme - Active theme.defaultTheme - Default theme.disabledTheme - Disabled theme.
public SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme,
SubstanceTheme activeTitlePaneTheme)
displayName - Theme display name.themeKind - Theme kind.activeTheme - Active theme.defaultTheme - Default theme.disabledTheme - Disabled theme.activeTitlePaneTheme - Active title pane theme.
public SubstanceComplexTheme(java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind,
SubstanceTheme activeTheme,
SubstanceTheme defaultTheme,
SubstanceTheme disabledTheme,
SubstanceTheme activeTitlePaneTheme,
SubstanceTheme watermarkTheme)
displayName - Theme display name.themeKind - Theme kind.activeTheme - Active theme.defaultTheme - Default theme.disabledTheme - Disabled theme.activeTitlePaneTheme - Active title pane theme.watermarkTheme - Watermark theme.| Method Detail |
|---|
public SubstanceTheme getActiveTheme()
SubstanceThemethis theme.
This method is for internal use only.
getActiveTheme in class SubstanceThemethis theme.public SubstanceTheme getDefaultTheme()
SubstanceThemethis theme.
This method is for internal use only.
getDefaultTheme in class SubstanceThemethis theme.public SubstanceTheme getDisabledTheme()
SubstanceThemethis theme.
This method is for internal use only.
getDisabledTheme in class SubstanceThemethis theme.public SubstanceTheme getActiveTitlePaneTheme()
SubstanceTheme
getActiveTitlePaneTheme in class SubstanceThemepublic SubstanceTheme getDefaultTitlePaneTheme()
SubstanceTheme
getDefaultTitlePaneTheme in class SubstanceThemepublic java.awt.Color getLightBackgroundColor()
SubstanceTheme
getLightBackgroundColor in class SubstanceThemepublic SubstanceTheme getFirstTheme()
SubstanceTheme
getFirstTheme in class SubstanceThemepublic SubstanceTheme getSecondTheme()
SubstanceTheme
getSecondTheme in class SubstanceTheme
public SubstanceTheme saturate(double saturateFactor,
boolean toSaturateEverything)
SubstanceThemethis theme.
The value and brightness stay the same. This method is part of officially
supported API.
saturate in class SubstanceThemesaturateFactor - Value in -1.0...1.0 range. Positive values create more
saturated colors. Negative values create more desaturated
colors.toSaturateEverything - If true, all visual components of
this theme will be saturated. If
false, only the SubstanceTheme.getActiveTheme() will
be saturated.
this theme.
public SubstanceTheme shift(java.awt.Color backgroundShiftColor,
double backgroundShiftFactor,
java.awt.Color foregroundShiftColor,
double foregroundShiftFactor)
SubstanceThemethis theme. This method is part
of officially supported API.
shift in class SubstanceThemebackgroundShiftColor - Shift color for background colors. Should have full opacity.backgroundShiftFactor - Value in 0.0...1.0 range. Larger values shift more towards the
specified color.foregroundShiftColor - Shift color for foreground colors. Should have full opacity.foregroundShiftFactor - Value in 0.0...1.0 range. Larger values shift more towards the
specified color.
this theme.public SubstanceTheme shade(double shadeFactor)
SubstanceThemethis
theme. This method is part of officially supported API.
shade in class SubstanceThemeshadeFactor - Value in 0.0...1.0 range. Larger values shift more towards
black color.
this theme.public SubstanceTheme tint(double tintFactor)
SubstanceThemethis
theme. This method is part of officially supported API.
tint in class SubstanceThemetintFactor - Value in 0.0...1.0 range. Larger values shift more towards
white color.
this theme.public SubstanceTheme tone(double toneFactor)
SubstanceThemethis
theme. This method is part of officially supported API.
tone in class SubstanceThemetoneFactor - Value in 0.0...1.0 range. Larger values shift more towards
gray color.
this theme.public SubstanceTheme invert()
SubstanceThemethis theme. This method is
part of officially supported API.
invert in class SubstanceThemethis theme.public SubstanceTheme negate()
SubstanceThemethis theme. This method is
part of officially supported API.
negate in class SubstanceThemethis theme.public SubstanceTheme hueShift(double hueShiftFactor)
SubstanceThemethis
theme. This method is part of officially supported API.
hueShift in class SubstanceThemehueShiftFactor - Value in -1.0...1.0 range.
this theme.public SubstanceTheme protanopia()
SubstanceThemethis theme that simulates the
protanopia color blindness.
protanopia in class SubstanceThemethis theme that simulates the
protanopia color blindness.public SubstanceTheme tritanopia()
SubstanceThemethis theme that simulates the
tritanopia color blindness.
tritanopia in class SubstanceThemethis theme that simulates the
tritanopia color blindness.public SubstanceTheme deuteranopia()
SubstanceThemethis theme that simulates the
deuteranopia color blindness.
deuteranopia in class SubstanceThemethis theme that simulates the
deuteranopia color blindness.public SubstanceTheme getWatermarkTheme()
SubstanceTheme
getWatermarkTheme in class SubstanceThemepublic SubstanceGradientPainter getNonActivePainter()
SubstanceTheme
getNonActivePainter in class SubstanceThemepublic void setNonActivePainter(SubstanceGradientPainter nonActivePainter)
nonActivePainter - Painter for painting the non-active controls.public void setDefaultTitlePaneTheme(SubstanceTheme defaultTitlePaneTheme)
defaultTitlePaneTheme - Theme for title panes of inactive windows.public void setDefaultTheme(SubstanceTheme defaultTheme)
defaultTheme - The theme for the default visual state.public void setDisabledTheme(SubstanceTheme disabledTheme)
disabledTheme - The theme for the disabled visual state.public void setActiveTheme(SubstanceTheme activeTheme)
activeTheme - The theme for the active visual state.public void setActiveTitlePaneTheme(SubstanceTheme activeTitlePaneTheme)
activeTitlePaneTheme - The theme for the title panes of active windows.public void setWatermarkTheme(SubstanceTheme watermarkTheme)
watermarkTheme - The theme for the watermark.public double getSelectedTabFadeStart()
SubstanceThemeJTabbedPanes. This value can be used to create XP-like "headers"
on the selected tabs.
getSelectedTabFadeStart in class SubstanceThemeJTabbedPanes.SubstanceTheme.getSelectedTabFadeEnd()public double getSelectedTabFadeEnd()
SubstanceThemeJTabbedPanes. This value can be used to create XP-like "headers"
on the selected tabs.
getSelectedTabFadeEnd in class SubstanceThemeJTabbedPanes.SubstanceTheme.getSelectedTabFadeStart()public void setSelectedTabFadeEnd(double selectedTabFadeEnd)
JTabbedPanes.
The value should be in 0.0-1.0 range.
selectedTabFadeEnd - The end of fade effect on the selected tabs in
JTabbedPanes. Should be in 0.0-1.0 range.public void setSelectedTabFadeStart(double selectedTabFadeStart)
JTabbedPanes.
The value should be in 0.0-1.0 range.
selectedTabFadeStart - The start of fade effect on the selected tabs in
JTabbedPanes. Should be in 0.0-1.0 range.public void setUseSameBackgroundColor(boolean useSameBackgroundColor)
useSameBackgroundColor - if true, the light background color and the
background color are the same.
public void registerComponentStateTheme(SubstanceTheme stateTheme,
float alpha,
boolean useForHighlights,
ComponentState... states)
stateTheme - Theme for the specified component state.alpha - Alpha channel for the theme.useForHighlights - if true, the specified theme will be used as
highlight theme as well (for the same component state).states - Component states.
public void registerComponentStateTheme(SubstanceTheme stateTheme,
boolean useForHighlights,
ComponentState... states)
stateTheme - Theme for the specified component state.useForHighlights - if true, the specified theme will be used as
highlight theme as well (for the same component state).states - Component states.
public void registerComponentHighlightStateTheme(SubstanceTheme stateHighlightTheme,
ComponentState... states)
null, or a global highlight theme
otherwise.
stateHighlightTheme - Highlight theme for the specified component state.states - Component states. If null, the specified theme
will be applied for all states left unspecified.
public void registerComponentHighlightStateTheme(SubstanceTheme stateHighlightTheme,
float alpha,
ComponentState... states)
null, or a global highlight theme
otherwise.
stateHighlightTheme - Highlight theme for the specified component state.alpha - Alpha channel for the highlight theme.states - Component states. If null, the specified theme
will be applied for all states left unspecified.
public SubstanceTheme getTheme(java.awt.Component comp,
ComponentState componentState)
SubstanceTheme
getTheme in class SubstanceThemecomponentState - Component state.
public SubstanceTheme getTheme(java.awt.Component comp,
ComponentState componentState,
boolean toIgnoreHighlights)
getTheme in class SubstanceTheme
public SubstanceTheme getHighlightTheme(java.awt.Component comp,
ComponentState componentState)
SubstanceTheme
getHighlightTheme in class SubstanceThemecomp - Component.componentState - Component state.
public float getHighlightThemeAlpha(java.awt.Component comp,
ComponentState componentState)
SubstanceTheme
getHighlightThemeAlpha in class SubstanceThemecomp - Component.componentState - Component state.
public float getThemeAlpha(java.awt.Component comp,
ComponentState componentState)
SubstanceTheme
getThemeAlpha in class SubstanceThemecomp - Component.componentState - Component state.
protected void copyTo(SubstanceComplexTheme dst,
ThemeTransform shiftTransform)
this theme to the
specified theme.
dst - Theme to copy to.shiftTransform - Transformation to apply to the copied settings.
public void registerDecorationAreaTheme(SubstanceTheme decorationTheme,
boolean toUseOnActiveControls,
DecorationAreaType... areaTypes)
decorationTheme - The theme to use on controls in decoration areas.toUseOnActiveControls - If false, the parameter theme will only be
used on controls in default state. In this case, controls in
disabled or active states will use the global theme.areaTypes - Enumerates the area types that are affected by the parameter
theme.public SubstanceTheme getDecorationTheme(DecorationAreaType decorationType)
getDecorationTheme in class SubstanceThemepublic boolean toUseDecorationPainter(DecorationAreaType decorationType)
toUseDecorationPainter in class SubstanceThemepublic boolean toUseDecorationThemeOnActiveControls(DecorationAreaType decorationType)
toUseDecorationThemeOnActiveControls in class SubstanceThemepublic boolean isPaintingToolbarDropShadows()
isPaintingToolbarDropShadows in class SubstanceThemepublic void setPaintingToolbarDropShadows()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||