|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
public class SimpleColorGenerator
The SimpleColorGenerator is an OMGridGenerator that creates an OMRaster out of OMGrid data. The OMgrid data is assumed to be color ARGB integer values. Each pixel is colored according to the closest grid data point value.
Nested Class Summary | |
---|---|
protected class |
SimpleColorGenerator.ByteRasterHelper
|
protected class |
SimpleColorGenerator.CharRasterHelper
|
protected class |
SimpleColorGenerator.DoubleRasterHelper
|
protected class |
SimpleColorGenerator.FloatRasterHelper
|
protected class |
SimpleColorGenerator.IntRasterHelper
|
protected static interface |
SimpleColorGenerator.RasterHelper
|
protected class |
SimpleColorGenerator.ShortRasterHelper
|
Constructor Summary | |
---|---|
SimpleColorGenerator()
|
Method Summary | |
---|---|
int |
calibratePointValue(int source)
Takes the value assigned to a pixel, as determined by it's location in the grid, and gives a color to paint the pixel. |
int[] |
createGreyscaleColors(int num_colors,
int opaqueness)
This method creates a set of greyscale colors. |
OMGraphic |
generate(OMGrid grid,
Projection proj)
Going to return an OMRaster, sized to the current projection, and colored according to the colortable. |
protected SimpleColorGenerator.RasterHelper |
getRasterHelper(GridData gd)
|
boolean |
needGenerateToRender()
We at least need one generate for XY and OFFSET grids. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleColorGenerator()
Method Detail |
---|
public OMGraphic generate(OMGrid grid, Projection proj)
generate
in interface OMGridGenerator
grid
- the grid to create a raster for.proj
- description of the map.public int calibratePointValue(int source)
source
- a grid point value assigned to the raster pixel.
public boolean needGenerateToRender()
needGenerateToRender
in interface OMGridGenerator
public int[] createGreyscaleColors(int num_colors, int opaqueness)
num_colors
- the number of greys needed.opaqueness
- how clear the color should be (0-255, where 0 is
clear).
protected SimpleColorGenerator.RasterHelper getRasterHelper(GridData gd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |