|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.theme.SubstanceTheme
public class SubstanceTheme
Theme for Substance look and feel. This class is part of
officially supported API.
| Nested Class Summary | |
|---|---|
static class |
SubstanceTheme.ThemeKind
Theme kind enumeration. |
| Field Summary | |
|---|---|
static ColorScheme |
AQUA
Used as reference to the default color scheme. |
static ColorScheme |
GREEN
Used as reference to the green color scheme. |
static ColorScheme |
ORANGE
Used as reference in attention-drawing animations. |
static ColorScheme |
YELLOW
Used as reference in attention-drawing animations. |
| Constructor Summary | |
|---|---|
SubstanceTheme(ColorScheme colorScheme,
java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind)
Simple constructor. |
|
| Method Summary | |
|---|---|
void |
addCustomEntriesToTable(javax.swing.UIDefaults table)
Adds theme-specific entries to the UI defaults table. |
static SubstanceTheme |
addUserDefined(ColorScheme scheme,
SubstanceTheme.ThemeKind themeKind,
java.lang.String displayName)
Deprecated. since 3.1 Use SubstanceTheme(ColorScheme, String, org.jvnet.substance.theme.SubstanceTheme.ThemeKind)
constructor instead. |
static SubstanceTheme |
createInstance(ThemeInfo themeInfo)
Creates a theme instance based on the specified theme info object. |
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. |
java.awt.Color |
getBackgroundColor()
Returns the background color for this theme. |
SubstanceTheme |
getBorderTheme()
Returns the theme for border painting. |
ColorScheme |
getColorScheme()
Returns the color scheme of this theme. |
SubstanceTheme |
getDecorationTheme(DecorationAreaType decorationType)
|
ColorScheme |
getDefaultColorScheme()
Returns the default color scheme that corresponds to this
theme. |
static ColorScheme |
getDefaultColorScheme(SubstanceTheme.ThemeKind themeKind)
Returns the default scheme that corresponds to the specified theme kind. |
SubstanceTheme |
getDefaultTheme()
Returns the default theme that corresponds to this theme. |
SubstanceTheme |
getDefaultTitlePaneTheme()
Returns the theme for title panes of inactive frames. |
java.awt.Color |
getDisabledBackgroundColor()
Deprecated. Will be removed in version 5.0. Use getDisabledTheme() and
getBackgroundColor(). |
ColorScheme |
getDisabledColorScheme()
Returns the disabled color scheme that corresponds to this
theme. |
static ColorScheme |
getDisabledColorScheme(SubstanceTheme.ThemeKind themeKind)
Returns the disabled scheme that corresponds to the specified theme kind. |
java.awt.Color |
getDisabledForegroundColor()
Deprecated. Will be removed in version 5.0. Use getDisabledTheme() and
getForegroundColor(). |
SubstanceTheme |
getDisabledTheme()
Returns the disabled theme that corresponds to this theme. |
java.lang.String |
getDisplayName()
Returns the display name of this trait. |
SubstanceTheme |
getFirstTheme()
Returns the first theme. |
javax.swing.plaf.ColorUIResource |
getForegroundColor()
Returns the foreground color for this 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. |
SubstanceTheme.ThemeKind |
getKind()
Returns the kind of this theme. |
java.awt.Color |
getLightBackgroundColor()
Returns the light background color for this theme. |
java.awt.Color |
getLineColor()
Returns the line color for this theme. |
java.awt.Color |
getLineColorDefault()
Returns the line 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. |
java.awt.Color |
getSelectionBackgroundColor()
Returns the selection background color for this theme. |
java.awt.Color |
getSelectionCellForegroundColor()
Returns the foreground color for selected cells for this theme. |
java.awt.Color |
getSelectionForegroundColor()
Returns the selection foreground color for this theme. |
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)
|
static SubstanceTheme |
getTheme(java.lang.String displayName)
Returns the theme that matches the specified display name. |
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. |
java.lang.String |
getThemeName()
Returns the name of this theme. |
java.awt.Color |
getWatermarkStampColor()
Returns the translucent watermark stamp color of this
theme. |
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 |
isDark()
Deprecated. Use getKind() instead. |
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. |
SubstanceTheme |
saturate(double saturateFactor)
Creates a saturated or desaturated version of this theme. |
SubstanceTheme |
saturate(double saturateFactor,
boolean toSaturateEverything)
Creates a saturated or desaturated version of this theme. |
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. |
java.lang.String |
toString()
|
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 |
|---|
public static ColorScheme AQUA
public static ColorScheme GREEN
public static ColorScheme YELLOW
public static ColorScheme ORANGE
| Constructor Detail |
|---|
public SubstanceTheme(ColorScheme colorScheme,
java.lang.String displayName,
SubstanceTheme.ThemeKind themeKind)
colorScheme - Color scheme for this theme.displayName - Display name for this theme.themeKind - Kind of this theme.| Method Detail |
|---|
public ColorScheme getColorScheme()
this theme. This method is
part of officially supported API.
this theme.public java.lang.String getThemeName()
this theme. This method is part of
officially supported API.
this theme.public void addCustomEntriesToTable(javax.swing.UIDefaults table)
table - UI defaults table.public javax.swing.plaf.ColorUIResource getForegroundColor()
public java.awt.Color getSelectionCellForegroundColor()
public java.awt.Color getSelectionForegroundColor()
public java.awt.Color getSelectionBackgroundColor()
public java.awt.Color getLineColor()
public java.awt.Color getLineColorDefault()
@Deprecated public java.awt.Color getDisabledBackgroundColor()
getDisabledTheme() and
getBackgroundColor().
@Deprecated public java.awt.Color getDisabledForegroundColor()
getDisabledTheme() and
getForegroundColor().
public java.awt.Color getLightBackgroundColor()
public java.awt.Color getBackgroundColor()
public SubstanceTheme.ThemeKind getKind()
this theme. This method is part of
officially supported API.
this theme.public static ColorScheme getDefaultColorScheme(SubstanceTheme.ThemeKind themeKind)
themeKind - Theme kind.
public static ColorScheme getDisabledColorScheme(SubstanceTheme.ThemeKind themeKind)
themeKind - Theme kind.
public java.lang.String getDisplayName()
SubstanceTraitthis trait. This method is
part of officially supported API.
getDisplayName in interface SubstanceTraitthis trait.public static SubstanceTheme getTheme(java.lang.String displayName)
displayName - Theme display name.
public ColorScheme getDefaultColorScheme()
this
theme. This method is for internal use only.
this
theme.public ColorScheme getDisabledColorScheme()
this
theme. This method is for internal use only.
this
theme.
public SubstanceTheme getTheme(java.awt.Component comp,
ComponentState componentState)
componentState - Component state.
public SubstanceTheme getTheme(java.awt.Component comp,
ComponentState componentState,
boolean toIgnoreHighlights)
public SubstanceTheme getHighlightTheme(java.awt.Component comp,
ComponentState componentState)
comp - Component.componentState - Component state.
public float getHighlightThemeAlpha(java.awt.Component comp,
ComponentState componentState)
comp - Component.componentState - Component state.
public float getThemeAlpha(java.awt.Component comp,
ComponentState componentState)
comp - Component.componentState - Component state.
public SubstanceTheme getActiveTheme()
this theme.
This method is for internal use only.
this theme.public SubstanceTheme getDefaultTheme()
this theme.
This method is for internal use only.
this theme.public SubstanceTheme getDisabledTheme()
this theme.
This method is for internal use only.
this theme.@Deprecated public boolean isDark()
getKind() instead.
this theme is dark. This method
is part of officially supported API.
true if this theme is dark,
false otherwise.
@Deprecated
public static SubstanceTheme addUserDefined(ColorScheme scheme,
SubstanceTheme.ThemeKind themeKind,
java.lang.String displayName)
SubstanceTheme(ColorScheme, String, org.jvnet.substance.theme.SubstanceTheme.ThemeKind)
constructor instead.
scheme - Color scheme object.themeKind - Theme kind.displayName - Display name for the new theme.
public java.awt.Color getWatermarkStampColor()
this
theme. This method is for internal use only.
this theme.public static SubstanceTheme createInstance(ThemeInfo themeInfo)
themeInfo - Theme info.
public SubstanceTheme shift(java.awt.Color backgroundShiftColor,
double backgroundShiftFactor,
java.awt.Color foregroundShiftColor,
double foregroundShiftFactor)
this theme. This method is part
of officially supported API.
backgroundShiftColor - 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 tint(double tintFactor)
this
theme. This method is part of officially supported API.
tintFactor - Value in 0.0...1.0 range. Larger values shift more towards
white color.
this theme.public SubstanceTheme tone(double toneFactor)
this
theme. This method is part of officially supported API.
toneFactor - Value in 0.0...1.0 range. Larger values shift more towards
gray color.
this theme.public SubstanceTheme shade(double shadeFactor)
this
theme. This method is part of officially supported API.
shadeFactor - Value in 0.0...1.0 range. Larger values shift more towards
black color.
this theme.public SubstanceTheme saturate(double saturateFactor)
this theme.
The value and brightness stay the same. This method is part of officially
supported API.
saturateFactor - Value in -1.0...1.0 range. Positive values create more
saturated colors. Negative values create more desaturated
colors.
this theme.
public SubstanceTheme saturate(double saturateFactor,
boolean toSaturateEverything)
this theme.
The value and brightness stay the same. This method is part of officially
supported API.
saturateFactor - 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 getActiveTheme() will
be saturated.
this theme.public SubstanceTheme invert()
this theme. This method is
part of officially supported API.
this theme.public SubstanceTheme negate()
this theme. This method is
part of officially supported API.
this theme.public SubstanceTheme hueShift(double hueShiftFactor)
this
theme. This method is part of officially supported API.
hueShiftFactor - Value in -1.0...1.0 range.
this theme.public SubstanceTheme protanopia()
this theme that simulates the
protanopia color blindness.
this theme that simulates the
protanopia color blindness.public SubstanceTheme tritanopia()
this theme that simulates the
tritanopia color blindness.
this theme that simulates the
tritanopia color blindness.public SubstanceTheme deuteranopia()
this theme that simulates the
deuteranopia color blindness.
this theme that simulates the
deuteranopia color blindness.public SubstanceTheme getActiveTitlePaneTheme()
public SubstanceTheme getDefaultTitlePaneTheme()
public SubstanceTheme getFirstTheme()
public SubstanceTheme getSecondTheme()
public SubstanceTheme getWatermarkTheme()
public SubstanceTheme getBorderTheme()
public SubstanceGradientPainter getNonActivePainter()
public java.lang.String toString()
toString in class java.lang.Objectpublic double getSelectedTabFadeStart()
JTabbedPanes. This value can be used to create XP-like "headers"
on the selected tabs.
JTabbedPanes.getSelectedTabFadeEnd()public double getSelectedTabFadeEnd()
JTabbedPanes. This value can be used to create XP-like "headers"
on the selected tabs.
JTabbedPanes.getSelectedTabFadeStart()public SubstanceTheme getDecorationTheme(DecorationAreaType decorationType)
public boolean toUseDecorationPainter(DecorationAreaType decorationType)
public boolean toUseDecorationThemeOnActiveControls(DecorationAreaType decorationType)
public boolean isPaintingToolbarDropShadows()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||