Package microsim.gui.colormap
Class TripleRangeColorMap
- java.lang.Object
-
- microsim.gui.colormap.FixedColorMap
-
- microsim.gui.colormap.TripleRangeColorMap
-
- All Implemented Interfaces:
ColorMap
public class TripleRangeColorMap extends FixedColorMap
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
-
-
Constructor Summary
Constructors Constructor Description TripleRangeColorMap(int gradients, java.awt.Color bottomColor, java.awt.Color middleColor, java.awt.Color topColor, double minValue, double midValue, 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.
-
-