ilog.views.maps.rendering
Class IlvDefaultImageRenderer

java.lang.Object
  extended by ilog.views.maps.rendering.IlvDefaultImageRenderer
All Implemented Interfaces:
IlvPersistentObject, IlvFeatureRenderer
Direct Known Subclasses:
IlvRasterImageRenderer

public class IlvDefaultImageRenderer
extends Object
implements IlvFeatureRenderer

This renderer translates a feature whose geometry is an image into an IlvIcon. If a projection is required, it is handled in a simplistic way (only the corners of the image are projected).

Since:
ILOG JViews 3.0
See Also:
IlvMapImage, IlvIcon

Constructor Summary
IlvDefaultImageRenderer()
          Creates an instance of the renderer.
IlvDefaultImageRenderer(IlvInputStream stream)
          Reads the renderer from an IlvInputStream.
 
Method Summary
 IlvMapImageRenderingStyle getImageRenderingStyle()
          Retrieves the rendering style of the renderer.
 boolean isPersistent()
          Returns true.
 boolean isSynchronousImageLoading()
          Returns true if the image loading mode is synchronous and false otherwise.
 IlvGraphic makeGraphic(IlvMapFeature feature, IlvCoordinateTransformation transformation)
          Translates a feature with an image geometry into an IlvIcon.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDefaultImageRenderer

public IlvDefaultImageRenderer()
Creates an instance of the renderer.


IlvDefaultImageRenderer

public IlvDefaultImageRenderer(IlvInputStream stream)
                        throws IlvReadFileException
Reads the renderer from an IlvInputStream.

Throws:
IlvReadFileException
Method Detail

makeGraphic

public IlvGraphic makeGraphic(IlvMapFeature feature,
                              IlvCoordinateTransformation transformation)
                       throws IlvMapRenderException,
                              IlvCoordinateTransformationException
Translates a feature with an image geometry into an IlvIcon. Note that this method has been changed since ILOG JViews 5.0. The old method was makeGraphic(IlvMapFeature, IlvProjection). In case you have overridden the old makeGraphic method, you have to rewrite your method in order to migrate to JViews 5.0.

Specified by:
makeGraphic in interface IlvFeatureRenderer
Parameters:
feature - The map feature to translate.
transformation - The transformation. This parameter should never be null.
Throws:
IlvMapRenderException - If the renderer can not process the map feature.
IlvCoordinateTransformationException - If a transformation exception occurs.
Since:
JViews 5.0

setSynchronousImageLoading

public void setSynchronousImageLoading(boolean synchronous)
Sets the image loading mode to synchronous or asynchronous accordingly to the value of the synchronous parameter. In synchronous mode, a MediaTracker waits for the image to be fully loaded before creating the IlvIcon in the makeGraphic method.

Since:
JViews 3.5

isSynchronousImageLoading

public boolean isSynchronousImageLoading()
Returns true if the image loading mode is synchronous and false otherwise.

Since:
JViews 3.5
See Also:
setSynchronousImageLoading(boolean)

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the renderer to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Specified by:
write in interface IlvFeatureRenderer
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

isPersistent

public boolean isPersistent()
Returns true.

Specified by:
isPersistent in interface IlvFeatureRenderer

getImageRenderingStyle

public IlvMapImageRenderingStyle getImageRenderingStyle()
Retrieves the rendering style of the renderer.

Returns:
The rendering style.
Since:
JViews 5.0

setImageRenderingStyle

public void setImageRenderingStyle(IlvMapImageRenderingStyle style)
Sets the rendering style of the renderer.

Parameters:
style - The IlvMapImageRenderingStyle.
Since:
JViews 5.0


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.