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 TypeMethodDescriptionbooleanTests 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.intReturns 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
getRangeMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 (nullnot permitted).lowColor- the color for the low end of the data range (nullnot permitted).highColor- the color for the high end of the data range (nullnot 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:
valueToColorin interfaceColorScale- Parameters:
value- the data value.- Returns:
- The color (never
null).
-
equals
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractColorScale- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-