Class DoubleRangeColorMap
java.lang.Object
microsim.gui.colormap.FixedColorMap
microsim.gui.colormap.DoubleRangeColorMap
- All Implemented Interfaces:
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
-
Field Summary
Fields inherited from class FixedColorMap
colorComponents, colorList, colors, mapper -
Constructor Summary
ConstructorsConstructorDescriptionDoubleRangeColorMap(int gradients, Color bottomColor, Color topColor, double minValue, double maxValue) -
Method Summary
Methods inherited from class FixedColorMap
addColor, addColor, getColor, getColorComponents, getColorIndex, getMappedColor, toArray
-
Constructor Details
-
DoubleRangeColorMap
-
-
Method Details
-
getColorIndex
public int getColorIndex(double value) Description copied from class:FixedColorMapReturn the color index.- Specified by:
getColorIndexin interfaceColorMap- Overrides:
getColorIndexin classFixedColorMap- Parameters:
value- The value to be mapped.- Returns:
- The index of the color list mapping the value.
-