Package microsim.gui.colormap
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 Summary
Constructors Constructor Description DoubleRangeColorMap(int gradients, java.awt.Color bottomColor, java.awt.Color topColor, double minValue, double maxValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColorIndex(double value)
Return the color index.-
Methods inherited from class microsim.gui.colormap.FixedColorMap
addColor, addColor, getColor, getColorComponents, getColorIndex, getMappedColor, toArray
-
-
-
-
Method Detail
-
getColorIndex
public int getColorIndex(double value)
Description copied from class:FixedColorMap
Return the color index.- Specified by:
getColorIndex
in interfaceColorMap
- Overrides:
getColorIndex
in classFixedColorMap
- Parameters:
value
- The value to be mapped.- Returns:
- The index of the color list mapping the value.
-
-