public class IlvGradientRenderingHint extends Object implements IlvDataRenderingHint, Serializable
The default implementation of IlvGradientRenderingHint
uses the y-value of a data point to determine its color according to the
transition values of the gradient.
Here is a picture showing a gradient rendering hint going from blue for minimum values to red for maximum values.
Constructor and Description |
---|
IlvGradientRenderingHint(double[] values,
Color[] colors)
Creates a new gradient rendering hint.
|
Modifier and Type | Method and Description |
---|---|
protected Color |
getColor(IlvDisplayPoint dp)
Returns the color to apply to the specified display point.
|
Color |
getGradientColor(int idx)
Returns the transition color at the specified index.
|
double |
getGradientValue(int idx)
Returns the transition value at the specified index.
|
IlvStyle |
getStyle(IlvDisplayPoint dp,
IlvStyle defaultStyle)
Returns the rendering style that must be used to display the specified
point.
|
protected double |
getValue(IlvDisplayPoint dp)
Returns the value that will be used to compute the color of the
specified point.
|
public IlvGradientRenderingHint(double[] values, Color[] colors)
values
- The transition values of the gradient. The provided
array must be sorted in ascending order.colors
- The colors associated with the transition values.public IlvStyle getStyle(IlvDisplayPoint dp, IlvStyle defaultStyle)
getStyle
in interface IlvDataRenderingHint
dp
- The considered display point.defaultStyle
- The default style used to display the point. This
style corresponds to the style that would be used if no hint was defined.protected Color getColor(IlvDisplayPoint dp)
public final double getGradientValue(int idx)
idx
- The considered index.public final Color getGradientColor(int idx)
idx
- The considered index.protected double getValue(IlvDisplayPoint dp)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.