public class ColorBlender extends AbstractColorProvider
Constructor and Description |
---|
ColorBlender(ColorProvider color1,
ColorProvider color2,
float blendAmount)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Returns the default color when no component is available.
|
java.awt.Color |
getColor(java.awt.Component component)
Returns the color obtained from the given component.
|
public ColorBlender(ColorProvider color1, ColorProvider color2, float blendAmount)
color1
- provides the first colorcolor2
- provides the second colorblendAmount
- the blend amount, range 0 - 1 where 0 means only the first color and 1 means only the second colorpublic java.awt.Color getColor(java.awt.Component component)
ColorProvider
getColor
in interface ColorProvider
getColor
in class AbstractColorProvider
component
- the componentpublic java.awt.Color getColor()
ColorProvider
getColor
in interface ColorProvider
getColor
in class AbstractColorProvider