Class TripleRangeColorMap
java.lang.Object
microsim.gui.colormap.FixedColorMap
microsim.gui.colormap.TripleRangeColorMap
- All Implemented Interfaces:
ColorMap
It builds automatically a color map oscillating from a bottom color to a
middle one and from the middle
to a top one, on a variable range.
Title: JAS
Description: Java Agent-based Simulation library
Copyright (C) 2002 Michele Sonnessa
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.- Author:
- Michele Sonnessa
-
Field Summary
Fields inherited from class FixedColorMap
colorComponents, colorList, colors, mapper -
Constructor Summary
ConstructorsConstructorDescriptionTripleRangeColorMap(int gradients, Color bottomColor, Color middleColor, Color topColor, double minValue, double midValue, double maxValue) -
Method Summary
Methods inherited from class FixedColorMap
addColor, addColor, getColor, getColorComponents, getColorIndex, getMappedColor, toArray
-
Constructor Details
-
TripleRangeColorMap
-
-
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.
-