bookExamples.ch27BusinessGraphics.charts
Class Lut
java.lang.Object
   bookExamples.ch27BusinessGraphics.charts.Lut
bookExamples.ch27BusinessGraphics.charts.Lut
- public class Lut 
- extends java.lang.Object
ColorUtils generates
 bright colors for each slice of the pie.
 Requires an integer indicating how many slices there are altogether
 to be constructed.
 Global variables:
 
 -  ColorMap: An array of colors, initialized to null
 
- Since:
- JDK 1.3
- Author:
- Allison McHenry, Douglas Lyon, PhD
| Constructor Summary | 
| Lut(int nc)Constructor containing number of slices of pie that need to be drawn.
 | 
 
| Method Summary | 
|  java.awt.Color | getColor(int i)Walks through the
        array of colors and matches the data affineTransform index i with the color in
        the color map affineTransform index i.
 | 
|  java.awt.Color[] | getColorMap()
 | 
| static int | getIntColor(int r,
            int g,
            int b)
 | 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Lut
public Lut(int nc)
- Constructor containing number of slices of pie that need to be drawn.
        Calls getColorMap function which gets each color.
 
- Parameters:
- nc- Total number of colors needed (xVals.length)
- See Also:
- getColorMap()
 
getColorMap
public java.awt.Color[] getColorMap()
- 
 
getColor
public java.awt.Color getColor(int i)
- Walks through the
        array of colors and matches the data affineTransform index i with the color in
        the color map affineTransform index i.
 
- 
- Parameters:
- i- Which specific slice is being drawn right now
- Returns:
- c       One color from the color map to be used in drawing this slice
 
getIntColor
public static int getIntColor(int r,
                              int g,
                              int b)
-