java.lang.Object
org.jfree.chart3d.renderer.AbstractColorScale
org.jfree.chart3d.renderer.GradientColorScale
- All Implemented Interfaces:
Serializable
,ColorScale
A color scale that runs a linear gradient between two colors.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGradientColorScale
(Range range, Color lowColor, Color highColor) Creates a new instance with the specified value range and colors. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this instance for equality with an arbitrary object.Returns the color for the high end of the data value range.Returns the color for the low end of the data value range.int
Returns the number of samples used by this color scale.valueToColor
(double value) Returns the color corresponding to the specified data value.Methods inherited from class org.jfree.chart3d.renderer.AbstractColorScale
getRange
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.chart3d.renderer.ColorScale
getRange
-
Constructor Details
-
GradientColorScale
Creates a new instance with the specified value range and colors.- Parameters:
range
- the data value range (null
not permitted).lowColor
- the color for the low end of the data range (null
not permitted).highColor
- the color for the high end of the data range (null
not permitted).
-
-
Method Details
-
getLowColor
Returns the color for the low end of the data value range.- Returns:
- The color (never
null
).
-
getHighColor
Returns the color for the high end of the data value range.- Returns:
- The color (never
null
).
-
getSampleCount
Returns the number of samples used by this color scale.- Returns:
- The number of samples.
-
valueToColor
Returns the color corresponding to the specified data value. If this- Specified by:
valueToColor
in interfaceColorScale
- Parameters:
value
- the data value.- Returns:
- The color (never
null
).
-
equals
Tests this instance for equality with an arbitrary object.- Overrides:
equals
in classAbstractColorScale
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-