|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.rendering.IlvDefaultTextRenderer
public class IlvDefaultTextRenderer
This renderer translates a map feature whose geometry is an
IlvMapText into an IlvGraphic label.
The IlvGraphic produced can be an IlvLabel,
an IlvZoomableLabel or an IlvMapLabel
depending on the class specified by the setLabelClass method.
The attributes of the generated label are specified using an
IlvMapTextRenderingStyle.
IlvMapText,
IlvLabel,
IlvZoomableLabel,
IlvMapLabel| Constructor Summary | |
|---|---|
IlvDefaultTextRenderer()
Creates an instance of a text renderer. |
|
IlvDefaultTextRenderer(IlvInputStream stream)
Reads a text renderer from an IlvInputStream. |
|
| Method Summary | |
|---|---|
protected IlvGraphic |
createText(Class klass,
Object anchor,
String string,
IlvMapTextRenderingStyle style)
Creates a text of a non predefined class. |
Class |
getLabelClass()
Retrieves the class of the generated label. |
IlvMapTextRenderingStyle |
getTextRenderingStyle()
Retrieves the text rendering style. |
boolean |
isPersistent()
Returns true. |
IlvGraphic |
makeGraphic(IlvMapFeature feature,
IlvCoordinateTransformation transformation)
Translates the map feature into a graphic object. |
void |
setLabelClass(Class cls)
Sets the class of the generated label. |
void |
setTextRenderingStyle(IlvMapTextRenderingStyle style)
Sets the text style for the labels. |
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 |
|---|
public IlvDefaultTextRenderer()
public IlvDefaultTextRenderer(IlvInputStream stream)
throws IlvReadFileException
IlvInputStream.
IlvReadFileException| Method Detail |
|---|
public IlvGraphic makeGraphic(IlvMapFeature feature,
IlvCoordinateTransformation transformation)
throws IlvMapRenderException,
IlvCoordinateTransformationException
setLabelClass
method, the IlvGraphic produced can be an IlvLabel,
an IlvZoomableLabel, or an IlvMapLabel.
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.
makeGraphic in interface IlvFeatureRendererfeature - The map feature to translate.transformation - The transformation. This parameter should never
be null.
IlvMapRenderException - If the renderer cannot process
the map feature.
IlvCoordinateTransformationException - If a transformation
exception occurs.
protected IlvGraphic createText(Class klass,
Object anchor,
String string,
IlvMapTextRenderingStyle style)
throws IlvMapRenderException
setLabelClass method.
The default implementation of the method throws an IlvMapRenderException
klass - The class of the label.anchor - The anchor of the label. Can be an IlvPoint or an IlvRectstring - The string to display on the label.style - The IlvMapTextRenderingStyle specifying rendering parameters to be applied to
the resulting IlvGraphic
IlvGraphic representing the test object.
IlvMapRenderExceptionpublic void setTextRenderingStyle(IlvMapTextRenderingStyle style)
style - The text rendering style.public IlvMapTextRenderingStyle getTextRenderingStyle()
public Class getLabelClass()
IlvLabel,
an IlvZoomableLabel, or an IlvMapLabel.
public void setLabelClass(Class cls)
IlvLabel,
an IlvZoomableLabel, or an IlvMapLabel.
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectwrite in interface IlvFeatureRendererstream - the output stream
IOException - thrown when an exception occurs during
the write operation for this object.public boolean isPersistent()
true.
isPersistent in interface IlvFeatureRenderer
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||