com.infoviz.treeviz.nestedpie
Class ColorScale
java.lang.Object
com.infoviz.treeviz.nestedpie.ColorScale
- public class ColorScale
- extends java.lang.Object
Constructor Summary |
ColorScale(java.awt.Color minColor,
java.awt.Color midColor,
java.awt.Color maxColor)
creates a color scale |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorScale
public ColorScale(java.awt.Color minColor,
java.awt.Color midColor,
java.awt.Color maxColor)
- creates a color scale
- Parameters:
minColor
- the color that is applied to the min valuesmidColor
- the color that is applied to the values in
between the min and max values. use black to get the most
intuitive results. Other color as mid values generate a weird
color distributionmaxColor
- the color to be applied to the values that are greater
than the mid point of the range specified in the setRange method
the higher the value the brighter the color
getMinValue
public double getMinValue()
getMaxValue
public double getMaxValue()
setRange
public void setRange(double min,
double max)
getColor
public java.awt.Color getColor(double val)
- returns a color for the val specified. If the value is higher
than the max val specified in the range then the max color is
returned. Similar treatment is given to the valuse that are lower
than the min value