Package net.infonode.gui.colorprovider
Class ColorBlender
java.lang.Object
net.infonode.gui.colorprovider.AbstractColorProvider
net.infonode.gui.colorprovider.ColorBlender
- All Implemented Interfaces:
Serializable,ColorProvider
Blends two colors according to the given blend amount.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionColorBlender(ColorProvider color1, ColorProvider color2, float blendAmount) Constructor. -
Method Summary
-
Constructor Details
-
ColorBlender
Constructor.- Parameters:
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 color
-
-
Method Details
-
getColor
Description copied from interface:ColorProviderReturns the color obtained from the given component.- Specified by:
getColorin interfaceColorProvider- Overrides:
getColorin classAbstractColorProvider- Parameters:
component- the component- Returns:
- the color obtained from the given component
-
getColor
Description copied from interface:ColorProviderReturns the default color when no component is available.- Specified by:
getColorin interfaceColorProvider- Overrides:
getColorin classAbstractColorProvider- Returns:
- the default color when no component is available
-