|
|||||||||
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.SubstanceMixTheme
public class SubstanceMixTheme
Mixed theme. Mixed theme is based on two original themes, using the first
theme for the left part of the painting, the second theme for the right part
of the painting, and the theme blend gradient in the middle. Here is how you
can create and set a mixed theme:
SubstanceTheme mixed = new SubstanceMixTheme(
SubstanceAquaTheme(), SubstanceBottleGreenTheme());
SubstanceLookAndFeel.setCurrentTheme(mixed);
for (Frame frame : Frame.getFrames()) {
SwingUtilities.updateComponentTreeUI(frame);
}
This class is part of officially supported API.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jvnet.substance.theme.SubstanceTheme |
---|
SubstanceTheme.ThemeKind |
Field Summary |
---|
Fields inherited from class org.jvnet.substance.theme.SubstanceTheme |
---|
AQUA, GREEN, ORANGE, YELLOW |
Constructor Summary | |
---|---|
SubstanceMixTheme(SubstanceTheme... originalThemes)
Creates a new mixed theme. |
Method Summary | |
---|---|
SubstanceTheme |
getDefaultTheme()
Returns the default theme that corresponds to this theme. |
SubstanceTheme |
getDisabledTheme()
Returns the disabled theme that corresponds to this theme. |
SubstanceTheme |
getFirstTheme()
Returns the first theme. |
SubstanceTheme[] |
getOriginalThemes()
Returns the original themes. |
SubstanceTheme |
getSecondTheme()
Returns the second theme. |
SubstanceTheme |
hueShift(double hueShiftFactor)
Creates a hue-shifted (in HSB space) version of this
theme. |
SubstanceTheme |
invert()
Creates an inverted version of this theme. |
SubstanceTheme |
negate()
Creates a negated 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SubstanceMixTheme(SubstanceTheme... originalThemes)
originalThemes
- The original themes.Method Detail |
---|
public SubstanceTheme[] getOriginalThemes()
public SubstanceTheme tint(double tintFactor)
SubstanceTheme
this
theme. This method is part of officially supported API.
tint
in class SubstanceTheme
tintFactor
- Value in 0.0...1.0 range. Larger values shift more towards
white color.
this
theme.public SubstanceTheme tone(double toneFactor)
SubstanceTheme
this
theme. This method is part of officially supported API.
tone
in class SubstanceTheme
toneFactor
- Value in 0.0...1.0 range. Larger values shift more towards
gray color.
this
theme.public SubstanceTheme shade(double shadeFactor)
SubstanceTheme
this
theme. This method is part of officially supported API.
shade
in class SubstanceTheme
shadeFactor
- Value in 0.0...1.0 range. Larger values shift more towards
black color.
this
theme.public SubstanceTheme saturate(double saturateFactor, boolean toSaturateEverything)
SubstanceTheme
this
theme.
The value and brightness stay the same. This method is part of officially
supported API.
saturate
in class SubstanceTheme
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 SubstanceTheme.getActiveTheme()
will
be saturated.
this
theme.public SubstanceTheme hueShift(double hueShiftFactor)
SubstanceTheme
this
theme. This method is part of officially supported API.
hueShift
in class SubstanceTheme
hueShiftFactor
- Value in -1.0...1.0 range.
this
theme.public SubstanceTheme invert()
SubstanceTheme
this
theme. This method is
part of officially supported API.
invert
in class SubstanceTheme
this
theme.public SubstanceTheme negate()
SubstanceTheme
this
theme. This method is
part of officially supported API.
negate
in class SubstanceTheme
this
theme.public SubstanceTheme getFirstTheme()
SubstanceTheme
getFirstTheme
in class SubstanceTheme
public SubstanceTheme getSecondTheme()
SubstanceTheme
getSecondTheme
in class SubstanceTheme
public SubstanceTheme getDefaultTheme()
SubstanceTheme
this
theme.
This method is for internal use only.
getDefaultTheme
in class SubstanceTheme
this
theme.public SubstanceTheme getDisabledTheme()
SubstanceTheme
this
theme.
This method is for internal use only.
getDisabledTheme
in class SubstanceTheme
this
theme.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |