ilog.views.maps.rendering
Class IlvDefaultCurveRenderer

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

public class IlvDefaultCurveRenderer
extends Object
implements IlvFeatureRenderer

This renderer translates a map feature whose geometry is a predefined subclass of IlvMapCurve into an IlvGeneralPath, an IlvPolyline or into an IlvGraphicSet if the geometry is a subclass of IlvMapCurve.

Since:
JViews 3.5

Constructor Summary
IlvDefaultCurveRenderer()
          Initializes an instance of the renderer.
IlvDefaultCurveRenderer(boolean useGeneralPath)
          Initializes an instance of the renderer by specifying if the renderer should translate geometries into IlvGeneralPath or IlvPolyline.
IlvDefaultCurveRenderer(IlvInputStream stream)
          Reads the renderer from an IlvInputStream.
 
Method Summary
 IlvMapLineRenderingStyle getLineRenderingStyle()
          Returns the line rendering style.
 boolean isPersistent()
          Returns true if the renderer must be saved.
 boolean isUsingGeneralPath()
          Tells if the renderer translates geometries into IlvGeneralPath or IlvPolyline.
 IlvGraphic makeGraphic(IlvMapFeature feature, IlvCoordinateTransformation transformation)
          Translates an IlvMapFeature into a graphic object.
 void setLineRenderingStyle(IlvMapLineRenderingStyle style)
          Sets the rendering style for the lines.
 void setUsingGeneralPath(boolean useGeneralPath)
          Specifies if the renderer should translate geometries into IlvGeneralPath or IlvPolyline.
 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

IlvDefaultCurveRenderer

public IlvDefaultCurveRenderer()
Initializes an instance of the renderer. By default, geometries are translated into IlvPolyline.


IlvDefaultCurveRenderer

public IlvDefaultCurveRenderer(boolean useGeneralPath)
Initializes an instance of the renderer by specifying if the renderer should translate geometries into IlvGeneralPath or IlvPolyline.


IlvDefaultCurveRenderer

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

Throws:
IlvReadFileException
Method Detail

setUsingGeneralPath

public void setUsingGeneralPath(boolean useGeneralPath)
Specifies if the renderer should translate geometries into IlvGeneralPath or IlvPolyline.


isUsingGeneralPath

public boolean isUsingGeneralPath()
Tells if the renderer translates geometries into IlvGeneralPath or IlvPolyline.


makeGraphic

public IlvGraphic makeGraphic(IlvMapFeature feature,
                              IlvCoordinateTransformation transformation)
                       throws IlvMapRenderException,
                              IlvCoordinateTransformationException
Translates an IlvMapFeature into a graphic object. The map feature is transformed using the specified transformation to create the graphic object. Note that this method has been changed since ILOG 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.

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

getLineRenderingStyle

public IlvMapLineRenderingStyle getLineRenderingStyle()
Returns the line rendering style.

Returns:
The rendering style used to render lines.

setLineRenderingStyle

public void setLineRenderingStyle(IlvMapLineRenderingStyle style)
Sets the rendering style for the lines.

Parameters:
style - The style for rendering lines.

isPersistent

public boolean isPersistent()
Returns true if the renderer must be saved.

Specified by:
isPersistent in interface IlvFeatureRenderer

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.


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