|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.approximatrix.charting.render.colorscale.AbstractColorScale
com.approximatrix.charting.render.colorscale.SimpleColorScale
public class SimpleColorScale
Implements a simple color scale based on explicit maximum and minimum values specified. Red at low end, green at the center, and blue at the high end.
| Field Summary | |
|---|---|
protected static java.awt.Color |
FAILED_CALC
Returns this color whenever the max and min values are identical |
private double |
maxV
The highest value in the scale range |
private double |
minV
The lowest value in the scale range |
| Constructor Summary | |
|---|---|
SimpleColorScale()
Default constructor |
|
SimpleColorScale(double min,
double max)
Constructor excepting min and max range values as doubles |
|
SimpleColorScale(int min,
int max)
Constructor excepting min and max range values as integers |
|
| Method Summary | |
|---|---|
java.awt.Color |
getColor(double value)
Returns a color based on a double |
java.awt.Color |
getColor(int value)
Returns a color based on an integer |
| Methods inherited from class com.approximatrix.charting.render.colorscale.AbstractColorScale |
|---|
getColors, getColors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.awt.Color FAILED_CALC
private double minV
private double maxV
| Constructor Detail |
|---|
public SimpleColorScale()
public SimpleColorScale(double min,
double max)
min - the lowest expected valuemax - the highest expected value
public SimpleColorScale(int min,
int max)
min - the lowest expected valuemax - the highest expected value| Method Detail |
|---|
public java.awt.Color getColor(double value)
value - the data space value
public java.awt.Color getColor(int value)
value - the data space value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||