| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectGradient
public class Gradient
There are a number of defined gradient types (look at the static fields), but you can create any gradient you like by using either of the following functions:
myHeatMap.updateGradient(Gradient.createMultiGradient(new Color[] {Color.red, Color.white, Color.blue}, 256));
 
 Copyright: Copyright (c) 2007, 2008
HeatMap is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
HeatMap 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with HeatMap; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
| Field Summary | |
|---|---|
| static java.awt.Color[] | GRADIENT_BLACK_TO_WHITEProduces a gradient from black (low) to white (high) | 
| static java.awt.Color[] | GRADIENT_BLUE_TO_REDProduces a gradient from blue (low) to red (high) | 
| static java.awt.Color[] | GRADIENT_GREEN_YELLOW_ORANGE_REDProduces a gradient through green, yellow, orange, red | 
| static java.awt.Color[] | GRADIENT_HEATProduces a different gradient for hot things (black, brown, orange, white) | 
| static java.awt.Color[] | GRADIENT_HOTProduces a gradient for hot things (black, red, orange, yellow, white) | 
| static java.awt.Color[] | GRADIENT_MAROON_TO_GOLDProduces a gradient using the University of Minnesota's school colors, from maroon (low) to gold (high) | 
| static java.awt.Color[] | GRADIENT_RAINBOWProduces a gradient through the rainbow: violet, blue, green, yellow, orange, red | 
| static java.awt.Color[] | GRADIENT_RED_TO_GREENProduces a gradient from red (low) to green (high) | 
| static java.awt.Color[] | GRADIENT_ROYProduces a gradient through red, orange, yellow | 
| Constructor Summary | |
|---|---|
| Gradient() | |
| Method Summary | |
|---|---|
| static java.awt.Color[] | createGradient(java.awt.Color one,
               java.awt.Color two,
               int numSteps)Creates an array of Color objects for use as a gradient, using a linear interpolation between the two specified colors. | 
| static java.awt.Color[] | createMultiGradient(java.awt.Color[] colors,
                    int numSteps)Creates an array of Color objects for use as a gradient, using an array of Color objects. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.awt.Color[] GRADIENT_MAROON_TO_GOLD
public static final java.awt.Color[] GRADIENT_BLUE_TO_RED
public static final java.awt.Color[] GRADIENT_BLACK_TO_WHITE
public static final java.awt.Color[] GRADIENT_RED_TO_GREEN
public static final java.awt.Color[] GRADIENT_GREEN_YELLOW_ORANGE_RED
public static final java.awt.Color[] GRADIENT_RAINBOW
public static final java.awt.Color[] GRADIENT_HOT
public static final java.awt.Color[] GRADIENT_HEAT
public static final java.awt.Color[] GRADIENT_ROY
| Constructor Detail | 
|---|
public Gradient()
| Method Detail | 
|---|
public static java.awt.Color[] createGradient(java.awt.Color one,
                                              java.awt.Color two,
                                              int numSteps)
one - Color used for the bottom of the gradienttwo - Color used for the top of the gradientnumSteps - The number of steps in the gradient. 250 is a good number.
public static java.awt.Color[] createMultiGradient(java.awt.Color[] colors,
                                                   int numSteps)
colors - An array of Color objects used for the gradient. The Color at index 0 will be the lowest color.numSteps - The number of steps in the gradient. 250 is a good number.| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||