| Programming with JViews Maps > Creating a Map Application Using the API > Manipulating Renderers > Extending an Existing Renderer |
Extending an Existing Renderer |
INDEX
PREVIOUS
NEXT
|
Most of the time, you do not have to create a totally new renderer. You can use one of the default renderers that are supplied in the package and tailor it to your needs.
This section shows how to extend an IlvDefaultPointRenderer to add text of the type IlvLabel next to the point of the feature being rendered. It also shows the use of IlvMapRenderingStyle which are the classes used by the renderers in order to customize them. For instance, in this code example, the color of the labels generated by the renderer is obtained through the IlvMapPointRenderingStyle of the IlvDefaultPointRenderer.
The complete source code for the example in this section can be found in the following file:
<installdir>/jviews-maps81/codefragments/renderer/srchtml/MarkerTextRenderer.java
The text is stored in an attribute whose name is provided for the class MarkerTextRenderer. When this text exists, it is returned with the marker generated by the superclass of the renderer; otherwise only the marker is returned.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |