public class IlvDefaultRasterRenderer extends Object implements IlvFeatureRenderer
IlvMapRaster
into an IlvIcon
using
a color model to directly translate the values of the raster
into colors. The default color model is adapted to display terrain
elevations, but it can be changed.IlvMapRaster
,
IlvIcon
,
IlvIntervalColorModel
Constructor and Description |
---|
IlvDefaultRasterRenderer()
Creates an
IlvDefaultRasterRenderer . |
IlvDefaultRasterRenderer(IlvInputStream stream)
Reads an
IlvDefaultRasterRenderer from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
ColorModel |
getColorModel()
Returns the
ColorModel used by the renderer to make the graphic. |
IlvMapImageRenderingStyle |
getImageRenderingStyle()
Retrieves the rendering style of the renderer.
|
boolean |
isPersistent()
Returns
true . |
boolean |
isSynchronousImageLoading()
Returns
true if the image loading mode is synchronous,
false otherwise. |
IlvGraphic |
makeGraphic(IlvMapFeature feature,
IlvCoordinateTransformation transformation)
Translates a feature with a raster geometry into an
IlvIcon . |
static Image |
MakeImage(IlvMapRaster raster,
ColorModel colorModel)
Creates an image from an
IlvMapRaster by directly
translating the raster value into colors using a color model. |
void |
setColorModel(ColorModel model)
Sets the
ColorModel used by the renderer to create the graphic object. |
void |
setImageRenderingStyle(IlvMapImageRenderingStyle style)
Sets the rendering style of the renderer.
|
void |
setSynchronousImageLoading(boolean synchronous)
Sets the image loading mode to synchronous or asynchronous
accordingly to the value of the
synchronous
parameter. |
void |
write(IlvOutputStream stream)
Writes the renderer to an
IlvOutputStream . |
public IlvDefaultRasterRenderer()
IlvDefaultRasterRenderer
.public IlvDefaultRasterRenderer(IlvInputStream stream) throws IlvReadFileException
IlvDefaultRasterRenderer
from an
IlvInputStream
.IlvReadFileException
public IlvGraphic makeGraphic(IlvMapFeature feature, IlvCoordinateTransformation transformation) throws IlvMapRenderException, IlvCoordinateTransformationException
IlvIcon
.
Note that this method has been changed since Rogue Wave JViews 5.0. The old
method was draw(IlvMapFeature, IlvProjection)
. In case you
have overridden the old draw
method, you have to rewrite
your method in order to migrate to JViews 5.0.makeGraphic
in interface IlvFeatureRenderer
feature
- The map feature to translate.transformation
- The transformation. This parameter should never
be null
.IlvMapRenderException
- If the renderer can
not process the map feature.IlvCoordinateTransformationException
- If a transformation
exception occurs.public static Image MakeImage(IlvMapRaster raster, ColorModel colorModel)
IlvMapRaster
by directly
translating the raster value into colors using a color model.raster
- The raster from which an image will be created.colorModel
- The color model used to translate the values
of the raster into colors.public void setColorModel(ColorModel model)
ColorModel
used by the renderer to create the graphic object.
By default, the color model used by this renderer is a color
model that displays elevation rasters.public ColorModel getColorModel()
ColorModel
used by the renderer to make the graphic.public void setSynchronousImageLoading(boolean synchronous)
synchronous
parameter.
In synchronous mode, a MediaTracker
waits for the image to be fully loaded before
creating the IlvIcon
in the makeGraphic
method.public boolean isSynchronousImageLoading()
true
if the image loading mode is synchronous,
false
otherwise.setSynchronousImageLoading(boolean)
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in interface IlvFeatureRenderer
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.public boolean isPersistent()
true
.isPersistent
in interface IlvFeatureRenderer
public IlvMapImageRenderingStyle getImageRenderingStyle()
public void setImageRenderingStyle(IlvMapImageRenderingStyle style)
style
- The IlvMapImageRenderingStyle
.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.