Package com.formdev.flatlaf.util
Class DerivedColor
- java.lang.Object
-
- java.awt.Color
-
- javax.swing.plaf.ColorUIResource
-
- com.formdev.flatlaf.util.DerivedColor
-
- All Implemented Interfaces:
java.awt.Paint
,java.awt.Transparency
,java.io.Serializable
,javax.swing.plaf.UIResource
public class DerivedColor extends javax.swing.plaf.ColorUIResource
A (red) color that acts as a placeholder in UI defaults. The actual color is derived from another color, which is modified by the given color functions.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
baseOfDefaultColorRGB
private ColorFunctions.ColorFunction[]
functions
private boolean
hasBaseOfDefaultColor
-
Constructor Summary
Constructors Constructor Description DerivedColor(java.awt.Color defaultColor, ColorFunctions.ColorFunction... functions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
derive(java.awt.Color baseColor)
ColorFunctions.ColorFunction[]
getFunctions()
java.lang.String
toString()
-
Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB
-
-
-
-
Field Detail
-
functions
private final ColorFunctions.ColorFunction[] functions
-
hasBaseOfDefaultColor
private boolean hasBaseOfDefaultColor
-
baseOfDefaultColorRGB
private int baseOfDefaultColorRGB
-
-
Constructor Detail
-
DerivedColor
public DerivedColor(java.awt.Color defaultColor, ColorFunctions.ColorFunction... functions)
-
-
Method Detail
-
derive
public java.awt.Color derive(java.awt.Color baseColor)
-
getFunctions
public ColorFunctions.ColorFunction[] getFunctions()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.awt.Color
-
-