Package org.pushingpixels.substance.api
Interface SchemeDerivedColorsResolver
- All Known Implementing Classes:
DerivedColorsResolverLight
public interface SchemeDerivedColorsResolver
SchemeDerivedColorResolver
s must be immutable. The resolvers are passed to derived color
schemes to ensure that derived scheme resolve derived colors in the same way as the base scheme.-
Method Summary
Modifier and TypeMethodDescriptiongetBackgroundFillColor
(SubstanceColorScheme colorScheme) Returns the background fill color forthis
scheme.getFocusRingColor
(SubstanceColorScheme colorScheme) Returns the focus ring color forthis
scheme.getLineColor
(SubstanceColorScheme colorScheme) Returns the line color forthis
scheme.getSelectionBackgroundColor
(SubstanceColorScheme colorScheme) Returns the selection background color forthis
scheme.getSelectionForegroundColor
(SubstanceColorScheme colorScheme) Returns the selection foreground color forthis
scheme.getTextBackgroundFillColor
(SubstanceColorScheme colorScheme) Returns the text background fill color forthis
scheme.getWatermarkDarkColor
(SubstanceColorScheme colorScheme) Returns the watermark dark color forthis
scheme.getWatermarkLightColor
(SubstanceColorScheme colorScheme) Returns the watermark light color forthis
scheme.getWatermarkStampColor
(SubstanceColorScheme colorScheme) Resolves a derived color for a given color scheme.invert()
Inverts this resolver, for use with inverted color schemes and switching from light to dark schemes or vice versa.boolean
isDark()
Determines if this resolver is for dark color schemes.
-
Method Details
-
isDark
boolean isDark()Determines if this resolver is for dark color schemes.- Returns:
true
if it should be used in dark schemes
-
invert
SchemeDerivedColorsResolver invert()Inverts this resolver, for use with inverted color schemes and switching from light to dark schemes or vice versa.Some resolvers may not support this option. They may choose to throw an
UnsupportedOperationException
in that case. Instead of throwing the exception developers may choose to simply returnthis
signifying that the resolver cannot be inverted. Another option would be to use assertions, allowing the developers to discover mistakes during creation, but still being useful for clients:public void SchemeDerivedColorsResolver invert() { assert false : "this resolver cannot be inverted"; return this; }
- Returns:
- an inversion of this resolver
- Throws:
UnsupportedOperationException
- if this resolver cannot be inverted
-
getWatermarkStampColor
Resolves a derived color for a given color scheme.- Returns:
- the watermark stamp color for the supplied scheme.
-
getWatermarkLightColor
Returns the watermark light color forthis
scheme.- Returns:
- Watermark light color for
this
scheme.
-
getWatermarkDarkColor
Returns the watermark dark color forthis
scheme.- Returns:
- Watermark dark color for
this
scheme.
-
getLineColor
Returns the line color forthis
scheme.- Returns:
- The line color for
this
scheme.
-
getSelectionBackgroundColor
Returns the selection background color forthis
scheme.- Returns:
- The selection background color for
this
scheme.
-
getSelectionForegroundColor
Returns the selection foreground color forthis
scheme.- Returns:
- The selection foreground color for
this
scheme.
-
getBackgroundFillColor
Returns the background fill color forthis
scheme.- Returns:
- The background fill color for
this
scheme.
-
getTextBackgroundFillColor
Returns the text background fill color forthis
scheme.- Returns:
- The text background fill color for
this
scheme.
-
getFocusRingColor
Returns the focus ring color forthis
scheme.- Returns:
- The focus ring color for
this
scheme.
-