Class ShiftColorScheme
- java.lang.Object
-
- org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
-
- org.pushingpixels.radiance.theming.internal.colorscheme.ShiftColorScheme
-
- All Implemented Interfaces:
RadianceColorScheme
,SchemeBaseColors
,SchemeDerivedColors
,RadianceTrait
- Direct Known Subclasses:
ShadeColorScheme
,TintColorScheme
,ToneColorScheme
public class ShiftColorScheme extends BaseColorScheme
Base class for shifted color schemes. A shifted color scheme is based on some original color scheme, a shift color and a shift factor. All colors of the original color scheme are shifted towards the shift color based on the shift factor. The closer the shift factor value is to 1.0, the closer the colors of the shifted color scheme will be to the shift color.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Color
backgroundShiftColor
Shift color for background colors.private double
backgroundShiftFactor
Shift factor for background colors.private java.awt.Color
foregroundColor
The foreground color.private java.awt.Color
foregroundShiftColor
Shift color for foreground color.private double
foregroundShiftFactor
Shift factor for foreground colors.private java.awt.Color
mainDarkColor
The main dark color.private java.awt.Color
mainExtraLightColor
The main extra-light color.private java.awt.Color
mainLightColor
The main light color.private java.awt.Color
mainMidColor
The main medium color.private java.awt.Color
mainUltraDarkColor
The main ultra-dark color.private java.awt.Color
mainUltraLightColor
The main ultra-light color.private RadianceColorScheme
origScheme
The original color scheme.-
Fields inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
displayName, isDark
-
-
Constructor Summary
Constructors Constructor Description ShiftColorScheme(RadianceColorScheme origScheme, java.awt.Color shiftColor, double shiftFactor)
Creates a new shifted color scheme.ShiftColorScheme(RadianceColorScheme origScheme, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor, boolean shiftByBrightness)
Creates a new shifted color scheme.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getDarkColor()
Retrieves the dark color.java.awt.Color
getExtraLightColor()
Retrieves the extra color.java.awt.Color
getForegroundColor()
Retrieves the foreground color.java.awt.Color
getLightColor()
Retrieves the light color.java.awt.Color
getMidColor()
Retrieves the medium color.RadianceColorScheme
getOrigScheme()
Returns the original color scheme.double
getShiftFactor()
Returns the shift factor.java.awt.Color
getUltraDarkColor()
Retrieves the ultra-dark color.java.awt.Color
getUltraLightColor()
Retrieves the ultra-light color.-
Methods inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
blendWith, getAccentedBackgroundFillColor, getBackgroundFillColor, getDisplayName, getEchoColor, getFocusRingColor, getLineColor, getMarkColor, getSelectionBackgroundColor, getSelectionForegroundColor, getSeparatorPrimaryColor, getSeparatorSecondaryColor, getTextBackgroundFillColor, hueShift, invert, isDark, named, negate, saturate, shade, shift, shiftBackground, tint, tone, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pushingpixels.radiance.theming.api.colorscheme.RadianceColorScheme
getColorFilter
-
Methods inherited from interface org.pushingpixels.radiance.theming.api.colorscheme.SchemeBaseColors
toImage
-
-
-
-
Field Detail
-
backgroundShiftFactor
private double backgroundShiftFactor
Shift factor for background colors.
-
foregroundShiftFactor
private double foregroundShiftFactor
Shift factor for foreground colors.
-
backgroundShiftColor
private java.awt.Color backgroundShiftColor
Shift color for background colors.
-
foregroundShiftColor
private java.awt.Color foregroundShiftColor
Shift color for foreground color.
-
mainUltraLightColor
private java.awt.Color mainUltraLightColor
The main ultra-light color.
-
mainExtraLightColor
private java.awt.Color mainExtraLightColor
The main extra-light color.
-
mainLightColor
private java.awt.Color mainLightColor
The main light color.
-
mainMidColor
private java.awt.Color mainMidColor
The main medium color.
-
mainDarkColor
private java.awt.Color mainDarkColor
The main dark color.
-
mainUltraDarkColor
private java.awt.Color mainUltraDarkColor
The main ultra-dark color.
-
foregroundColor
private java.awt.Color foregroundColor
The foreground color.
-
origScheme
private RadianceColorScheme origScheme
The original color scheme.
-
-
Constructor Detail
-
ShiftColorScheme
public ShiftColorScheme(RadianceColorScheme origScheme, java.awt.Color shiftColor, double shiftFactor)
Creates a new shifted color scheme.- Parameters:
origScheme
- The original color scheme.shiftColor
- Shift color for the colors.shiftFactor
- Shift factor for the colors. Should be in 0.0-1.0 range.
-
ShiftColorScheme
public ShiftColorScheme(RadianceColorScheme origScheme, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor, boolean shiftByBrightness)
Creates a new shifted color scheme.- Parameters:
origScheme
- The original color scheme.backgroundShiftColor
- Shift color for the background colors.backgroundShiftFactor
- Shift factor for the background colors. Should be in 0.0-1.0 range.foregroundShiftColor
- Shift color for the foreground colors.foregroundShiftFactor
- Shift factor for the foreground colors. Should be in 0.0-1.0 range.shiftByBrightness
- Iftrue
, the shift will account for the brightness of the original color scheme colors.
-
-
Method Detail
-
getForegroundColor
public java.awt.Color getForegroundColor()
Description copied from interface:SchemeBaseColors
Retrieves the foreground color.- Returns:
- Foreground color.
-
getUltraLightColor
public java.awt.Color getUltraLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the ultra-light color.- Returns:
- Ultra-light color.
-
getExtraLightColor
public java.awt.Color getExtraLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the extra color.- Returns:
- Extra color.
-
getLightColor
public java.awt.Color getLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the light color.- Returns:
- Light color.
-
getMidColor
public java.awt.Color getMidColor()
Description copied from interface:SchemeBaseColors
Retrieves the medium color.- Returns:
- Medium color.
-
getDarkColor
public java.awt.Color getDarkColor()
Description copied from interface:SchemeBaseColors
Retrieves the dark color.- Returns:
- Dark color.
-
getUltraDarkColor
public java.awt.Color getUltraDarkColor()
Description copied from interface:SchemeBaseColors
Retrieves the ultra-dark color.- Returns:
- Ultra-dark color.
-
getOrigScheme
public RadianceColorScheme getOrigScheme()
Returns the original color scheme.- Returns:
- The original color scheme.
-
getShiftFactor
public double getShiftFactor()
Returns the shift factor.- Returns:
- Shift factor.
-
-