|
|||||||||
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. |
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()
Returns the disabled background color for this theme. |
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()
Returns the disabled foreground color for this theme. |
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 JTabbedPane s. |
double |
getSelectedTabFadeStart()
Returns the start of fade effect on the selected tabs in JTabbedPane s. |
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. |
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. |
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 |
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()
|
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()
public java.awt.Color getDisabledBackgroundColor()
public java.awt.Color getDisabledForegroundColor()
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()
SubstanceTrait
this
trait. This method is
part of officially supported API.
getDisplayName
in interface SubstanceTrait
this
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)
comp
- Component.componentState
- Component state.
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 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.Object
public double getSelectedTabFadeStart()
JTabbedPane
s. This value can be used to create XP-like "headers"
on the selected tabs.
JTabbedPane
s.getSelectedTabFadeEnd()
public double getSelectedTabFadeEnd()
JTabbedPane
s. This value can be used to create XP-like "headers"
on the selected tabs.
JTabbedPane
s.getSelectedTabFadeStart()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |