Class DoubleRangeColorMap

java.lang.Object
microsim.gui.colormap.FixedColorMap
microsim.gui.colormap.DoubleRangeColorMap
All Implemented Interfaces:
ColorMap

public class DoubleRangeColorMap extends FixedColorMap
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 Details

    • DoubleRangeColorMap

      public DoubleRangeColorMap(int gradients, Color bottomColor, Color topColor, double minValue, double maxValue)
  • Method Details

    • getColorIndex

      public int getColorIndex(double value)
      Description copied from class: FixedColorMap
      Return the color index.
      Specified by:
      getColorIndex in interface ColorMap
      Overrides:
      getColorIndex in class FixedColorMap
      Parameters:
      value - The value to be mapped.
      Returns:
      The index of the color list mapping the value.