Class ColorScale

  extended bycom.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
Method Summary
 java.awt.Color getColor(double val)
          returns a color for the val specified.
 double getMaxValue()
 double getMinValue()
 void setRange(double min, double max)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ColorScale(java.awt.Color minColor,
                  java.awt.Color midColor,
                  java.awt.Color maxColor)
creates a color scale

minColor - the color that is applied to the min values
midColor - 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 distribution
maxColor - 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
Method Detail


public double getMinValue()


public double getMaxValue()


public void setRange(double min,
                     double max)


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