|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.util.ColorMap
public class ColorMap
A color map provides a mapping from numeric values to specific colors. This useful for assigning colors to visualized items. The numeric values may represent different categories (i.e. nominal variables) or run along a spectrum of values (i.e. quantitative variables).
| Constructor Summary | |
|---|---|
ColorMap(int[] map,
double min,
double max)
Creates a new ColorMap instance using the given internal color map array and minimum and maximum index values. |
|
| Method Summary | |
|---|---|
int |
getColor(double val)
Returns the color associated with the given value. |
int[] |
getColorPalette()
Gets the internal color palette, an int array of color values. |
double |
getMaxValue()
Gets the maximum value that corresponds to the last color in the color map. |
double |
getMinValue()
Gets the minimum value that corresponds to the first color in the color map. |
void |
setColorPalette(int[] palette)
Sets the internal color palette, an int array of color values. |
void |
setMaxValue(double maxValue)
Sets the maximum value that corresponds to the last color in the color map. |
void |
setMinValue(double minValue)
Sets the minimum value that corresponds to the first color in the color map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorMap(int[] map,
double min,
double max)
map - the color palette, an int array of color valuesmin - the minimum value in the color mapmax - the maximum value in the color map| Method Detail |
|---|
public int getColor(double val)
val - the value for which to retrieve the color
public int[] getColorPalette()
public void setColorPalette(int[] palette)
palette - the new palette.public double getMaxValue()
public void setMaxValue(double maxValue)
maxValue - the new max index value.public double getMinValue()
public void setMinValue(double minValue)
minValue - the new min index value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||