ilog.views.maps.rendering
Class IlvDefaultPointRenderer

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

public class IlvDefaultPointRenderer
extends Object
implements IlvFeatureRenderer

This renderer translates a map feature whose geometry is an IlvMapPoint into an IlvMarker.

Since:
ILOG JViews 3.0
See Also:
IlvMapPoint, IlvMarker

Constructor Summary
IlvDefaultPointRenderer()
          Creates an instance of the renderer.
IlvDefaultPointRenderer(IlvInputStream stream)
          Reads a renderer from an IlvInputStream.
 
Method Summary
 IlvMapPointRenderingStyle getPointRenderingStyle()
          Retrieves the rendering style associated with the renderer.
 boolean isPersistent()
          Returns true.
 boolean isUsingFontMarker()
          Tells if the renderer is producing IlvFontMarker or IlvMarker.
 IlvGraphic makeGraphic(IlvMapFeature feature, IlvCoordinateTransformation transformation)
          Translates the map feature into a graphic object.
 void setPointRenderingStyle(IlvMapPointRenderingStyle style)
          Sets the rendering style for this renderer.
 void setUsingFontMarker(boolean useFontMarker)
          Tells if the renderer should produce an IlvFontMarker or an IlvMarker.
 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

IlvDefaultPointRenderer

public IlvDefaultPointRenderer()
Creates an instance of the renderer.


IlvDefaultPointRenderer

public IlvDefaultPointRenderer(IlvInputStream stream)
                        throws IlvReadFileException
Reads a renderer from an IlvInputStream.

Throws:
IlvReadFileException
Method Detail

getPointRenderingStyle

public IlvMapPointRenderingStyle getPointRenderingStyle()
Retrieves the rendering style associated with the renderer.

Since:
JViews 5.0

setPointRenderingStyle

public void setPointRenderingStyle(IlvMapPointRenderingStyle style)
Sets the rendering style for this renderer.

Parameters:
style - The style.
Since:
JViews 5.0

setUsingFontMarker

public void setUsingFontMarker(boolean useFontMarker)
Tells if the renderer should produce an IlvFontMarker or an IlvMarker.

Parameters:
useFontMarker - If true the renderer will produce an IlvFontMarker. If false, the rendered graphic will be an IlvMarker.
Since:
JViews 5.0
See Also:
IlvMapPointRenderingStyle.setFont(java.awt.Font), IlvMapPointRenderingStyle.setChar(char)

isUsingFontMarker

public boolean isUsingFontMarker()
Tells if the renderer is producing IlvFontMarker or IlvMarker.

Returns:
true if the renderer graphic is an IlvFontMarker, false otherwise.
Since:
JViews 5.0
See Also:
IlvMapPointRenderingStyle.setFont(java.awt.Font), IlvMapPointRenderingStyle.setChar(char)

makeGraphic

public IlvGraphic makeGraphic(IlvMapFeature feature,
                              IlvCoordinateTransformation transformation)
                       throws IlvMapRenderException,
                              IlvCoordinateTransformationException
Translates the map feature into a 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 cannot process the map feature.
IlvCoordinateTransformationException - If a transformation exception occurs.
Since:
JViews 5.0

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


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