|
EspressChart v 5.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--quadbase.util.ColorSpectrum
This class is used for defining the color of data based on the vertical value. Currently only 3D surface chart can support this feature. The following diagram shows the meaning of the color array and the value array.
Color Spectrum:
+-------+ highest value
| |
| red | color[2] = red
| |
+-------+ value[1] = 60.0
| |
| |
| yellow| color[1] = yellow
| |
| |
+-------+ value[0] = 30.0
| |
| green | color[0] = green
| |
+-------+ lowest value
If the color spectrum only has one value, the value array is null and the color array always has one element.
Otherwise, the color array always has one more element than the value array. Since a color spectrum object is
not mutable, another object has to be created when it need to be changed.
Generally speaking, if there are n values in the color spectrum,
value[0] < value[1] < .... < value[n-1] < value[n]
then the order of the array elements is as follows:
color[0], value[0], color[1], value[1], ... , color[n], value[n], color[n+1]
I3DPropertySet.setColorSpectrum(quadbase.util.ColorSpectrum),
I3DPropertySet.getColorSpectrum()| Constructor Summary | |
ColorSpectrum(java.awt.Color[] color,
double[] value)
Creates a color spectrum object. |
|
| Method Summary | |
java.awt.Color[] |
getColor()
This function returns the color array |
java.awt.Color |
getColor(double target)
This function returns the color corresponding to a target value |
double[] |
getValue()
This function returns the value array |
int |
getValueCount()
This function returns the number of value in the value array |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ColorSpectrum(java.awt.Color[] color,
double[] value)
throws java.lang.IllegalArgumentException
then the order of the array elements is as follows:
color[0], value[0], color[1], value[1], ... , color[n], value[n], color[n+1]
color - The color arrayvalue - The value array| Method Detail |
public java.awt.Color[] getColor()
public double[] getValue()
public int getValueCount()
public java.awt.Color getColor(double target)
|
EspressChart v 5.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||