|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.grid.ColoredShadingColors
public class ColoredShadingColors
A holder for handling colors for elevations. This ElevationColors object also takes into account slope when providing pixel int values.
Nested Class Summary | |
---|---|
static class |
ColoredShadingColors.ColorHelper
A helper class that associates an int color value with an elevation. |
Field Summary | |
---|---|
protected ColoredShadingColors.ColorHelper[] |
colors
|
int[] |
DEFAULT_COLOR_CUTOFFS
|
int[] |
DEFAULT_COLORS
|
protected int |
slopeColorAdjustment
Slope color adjustment, gets subtracted from the color for slopes of zerp or less. |
java.awt.Color |
waterColor
|
Constructor Summary | |
---|---|
ColoredShadingColors()
|
|
ColoredShadingColors(ColoredShadingColors.ColorHelper[] colors)
Constructor to provide unique elevation cutoffs and colors. |
Method Summary | |
---|---|
ColoredShadingColors.ColorHelper[] |
createDefaultColors()
|
int |
getARGB(int elevation,
Length units,
double slope)
Get the int argb value for a given elevation, with the provided units. |
java.awt.Color |
getColor(int elevation,
Length units,
double slope)
Get the Color for the given elevation, with the provided units. |
ColoredShadingColors.ColorHelper[] |
getColors()
Get an array of colors with elevation values. |
int[] |
getColortable()
Get a colortable as an array of ints. |
int |
getSlopeColorAdjustment()
|
java.awt.Color |
getWaterColor()
Get the color to use for water/invalid data, zero elevation. |
void |
setColors(ColoredShadingColors.ColorHelper[] clrs)
Set the list of ColorHelpers. |
void |
setSlopeColorAdjustment(int adj)
Set the color factor to subtract from the colors for level or negative slopes. |
void |
setWaterColor(java.awt.Color water)
Set the color to use for water/invalid data, zero elevation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ColoredShadingColors.ColorHelper[] colors
public java.awt.Color waterColor
public final int[] DEFAULT_COLOR_CUTOFFS
public final int[] DEFAULT_COLORS
protected int slopeColorAdjustment
Constructor Detail |
---|
public ColoredShadingColors()
public ColoredShadingColors(ColoredShadingColors.ColorHelper[] colors)
Method Detail |
---|
public void setSlopeColorAdjustment(int adj)
public int getSlopeColorAdjustment()
public ColoredShadingColors.ColorHelper[] getColors()
public void setColors(ColoredShadingColors.ColorHelper[] clrs)
public int[] getColortable()
ElevationColors
getColortable
in interface ElevationColors
public void setWaterColor(java.awt.Color water)
public java.awt.Color getWaterColor()
public java.awt.Color getColor(int elevation, Length units, double slope)
getColor
in interface ElevationColors
public int getARGB(int elevation, Length units, double slope)
getARGB
in interface ElevationColors
public ColoredShadingColors.ColorHelper[] createDefaultColors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |