public class ColoredShadingColors extends java.lang.Object implements ElevationColors
Modifier and Type | Class and Description |
---|---|
static class |
ColoredShadingColors.ColorHelper
A helper class that associates an int color value with an elevation.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ColoredShadingColors() |
ColoredShadingColors(ColoredShadingColors.ColorHelper[] colors)
Constructor to provide unique elevation cutoffs and colors.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected ColoredShadingColors.ColorHelper[] colors
public java.awt.Color waterColor
public final int[] DEFAULT_COLOR_CUTOFFS
public final int[] DEFAULT_COLORS
protected int slopeColorAdjustment
public ColoredShadingColors()
public ColoredShadingColors(ColoredShadingColors.ColorHelper[] colors)
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()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details