jas.plot
Class ColorTripleRangeMap
java.lang.Object
  
jas.plot.ColorMap
      
jas.plot.ColorTripleRangeMap
- All Implemented Interfaces: 
 - IColorMap
 
public class ColorTripleRangeMap
- extends 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
 
| 
Constructor Summary | 
ColorTripleRangeMap(int gradients,
                    java.awt.Color bottomColor,
                    java.awt.Color middleColor,
                    java.awt.Color topColor,
                    double minValue,
                    double midValue,
                    double maxValue)
 
            | 
 
| 
Method Summary | 
 int | 
getColorIndex(double value)
 
          Return the color index. | 
 
 
| Methods inherited from class java.lang.Object | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ColorTripleRangeMap
public ColorTripleRangeMap(int gradients,
                           java.awt.Color bottomColor,
                           java.awt.Color middleColor,
                           java.awt.Color topColor,
                           double minValue,
                           double midValue,
                           double maxValue)
getColorIndex
public int getColorIndex(double value)
- Description copied from class: 
ColorMap 
- Return the color index.
- Specified by:
 getColorIndex in interface IColorMap- Overrides:
 getColorIndex in class ColorMap
 
- Parameters:
 value - The value to be mapped.
- Returns:
 - The index of the color list mapping the value.