Package net.infonode.gui.colorprovider
Class ColorMultiplier
- java.lang.Object
-
- net.infonode.gui.colorprovider.AbstractColorProvider
-
- net.infonode.gui.colorprovider.ColorMultiplier
-
- All Implemented Interfaces:
java.io.Serializable
,ColorProvider
public class ColorMultiplier extends AbstractColorProvider
Multiplies the RGB components of a color with the given factor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ColorMultiplier(ColorProvider colorProvider, double factor)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ColorMultiplier
public ColorMultiplier(ColorProvider colorProvider, double factor)
Constructor.- Parameters:
colorProvider
- provides the color which RGB components will be multipliedfactor
- the multiply factor
-
-
Method Detail
-
getColor
public java.awt.Color getColor(java.awt.Component component)
Description copied from interface:ColorProvider
Returns the color obtained from the given component.- Specified by:
getColor
in interfaceColorProvider
- Overrides:
getColor
in classAbstractColorProvider
- Parameters:
component
- the component- Returns:
- the color obtained from the given component
-
getColor
public java.awt.Color getColor()
Description copied from interface:ColorProvider
Returns the default color when no component is available.- Specified by:
getColor
in interfaceColorProvider
- Overrides:
getColor
in classAbstractColorProvider
- Returns:
- the default color when no component is available
-
-