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)
ColorProvidergetColor in interface ColorProvidergetColor in class AbstractColorProvidercomponent - the componentpublic java.awt.Color getColor()
ColorProvidergetColor in interface ColorProvidergetColor in class AbstractColorProvider