Class 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 Detail

      • DoubleRangeColorMap

        public DoubleRangeColorMap​(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: 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.