gov.sns.tools.plot
Class RainbowColorGenerator

java.lang.Object
  |
  +--gov.sns.tools.plot.RainbowColorGenerator
All Implemented Interfaces:
ColorGenerator

public class RainbowColorGenerator
extends java.lang.Object
implements ColorGenerator

RainbowColorGenerator class keeps the map between color and range 0.0 - 1.0 based on the Rainbow approach. This class is based on the singleton pattern.


Method Summary
 java.awt.Color getColor(double value)
          Implementation of the ColorGenerator interface.
 java.awt.Color getColor(float value)
          Implementation of the ColorGenerator interface.
static RainbowColorGenerator getColorGenerator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColorGenerator

public static RainbowColorGenerator getColorGenerator()

getColor

public java.awt.Color getColor(float value)
Implementation of the ColorGenerator interface. Returns the Color corresponding the input value. The value should be more than 0. and less than 1.0

Specified by:
getColor in interface ColorGenerator

getColor

public java.awt.Color getColor(double value)
Implementation of the ColorGenerator interface. Returns the Color corresponding the input value. The value should be more than 0. and less than 1.0

Specified by:
getColor in interface ColorGenerator