com.bbn.openmap.omGraphics.grid
Class GreyscaleSlopeColors

java.lang.Object
  extended by com.bbn.openmap.omGraphics.grid.GreyscaleSlopeColors
All Implemented Interfaces:
ElevationColors

public class GreyscaleSlopeColors
extends java.lang.Object
implements ElevationColors

Creates the colors used for displaying the DTED images. The default mode is to use greyscale colors.


Field Summary
 int adjustment
          adjustment is set up for values between 1-5.
 int[] colors
          the colors in use right now, ARGB values.
static int DEFAULT_OPAQUENESS
           
static int NUM_COLORS
           
static int NUM_ELEVATION_COLORS
           
 java.awt.Color waterColor
           
 
Constructor Summary
GreyscaleSlopeColors()
          Default setting is 216 colors, and greyscale.
 
Method Summary
 int[] createGreyscaleColors(int num_colors, int opaqueness)
           
 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.
 int[] getColors()
          Get a List of colors.
 int[] getColortable()
          Get a colortable as an array of ints.
 java.awt.Color getWaterColor()
          Get the color to use for water/invalid data, zero elevation.
 int numColors()
           
 void setColors(int[] clrs)
          Set the List of colors.
 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

NUM_COLORS

public static final int NUM_COLORS
See Also:
Constant Field Values

NUM_ELEVATION_COLORS

public static final int NUM_ELEVATION_COLORS
See Also:
Constant Field Values

DEFAULT_OPAQUENESS

public static final int DEFAULT_OPAQUENESS
See Also:
Constant Field Values

waterColor

public java.awt.Color waterColor

colors

public int[] colors
the colors in use right now, ARGB values.


adjustment

public int adjustment
adjustment is set up for values between 1-5.

Constructor Detail

GreyscaleSlopeColors

public GreyscaleSlopeColors()
Default setting is 216 colors, and greyscale.

Method Detail

getColors

public int[] getColors()
Get a List of colors.


setColors

public void setColors(int[] clrs)
Set the List of colors.


getColortable

public int[] getColortable()
Description copied from interface: ElevationColors
Get a colortable as an array of ints.

Specified by:
getColortable in interface ElevationColors

setWaterColor

public void setWaterColor(java.awt.Color water)
Set the color to use for water/invalid data, zero elevation.


getWaterColor

public java.awt.Color getWaterColor()
Get the color to use for water/invalid data, zero elevation.


getColor

public java.awt.Color getColor(int elevation,
                               Length units,
                               double slope)
Get the Color for the given elevation, with the provided units. The slope of the land, from the northwest to the southeast, is provided.

Specified by:
getColor in interface ElevationColors

getARGB

public int getARGB(int elevation,
                   Length units,
                   double slope)
Get the int argb value for a given elevation, with the provided units. The slope of the land, from the northwest to the southeast, is provided in case that should matter.

Specified by:
getARGB in interface ElevationColors

numColors

public int numColors()

createGreyscaleColors

public int[] createGreyscaleColors(int num_colors,
                                   int opaqueness)


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details