jas.plot
Class ColorDoubleRangeMap

java.lang.Object
  extended by jas.plot.ColorMap
      extended by jas.plot.ColorDoubleRangeMap
All Implemented Interfaces:
IColorMap

public class ColorDoubleRangeMap
extends ColorMap

It builds automatically a color map varying between two colors on a variable range.

Title: JAS

Description: Java Agent-based Simulation library

Copyright: Copyright (c) 2002 under GPL library

Author:
Matteo Morini and Michele Sonnessa

Constructor Summary
ColorDoubleRangeMap(int gradients, java.awt.Color bottomColor, java.awt.Color topColor, double minValue, double maxValue)
           
 
Method Summary
 int getColorIndex(double value)
          Return the color index.
 
Methods inherited from class jas.plot.ColorMap
addColor, addColor, getColor, getColorComponents, getColorIndex, getMappedColor, toArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorDoubleRangeMap

public ColorDoubleRangeMap(int gradients,
                           java.awt.Color bottomColor,
                           java.awt.Color topColor,
                           double minValue,
                           double maxValue)
Method Detail

getColorIndex

public int getColorIndex(double value)
Description copied from class: ColorMap
Return the color index.

Specified by:
getColorIndex in interface IColorMap
Overrides:
getColorIndex in class ColorMap
Parameters:
value - The value to be mapped.
Returns:
The index of the color list mapping the value.