Accessing a renderer

You can access renderers by calling the method getRenderer of the class IlvSDMEngine.
This method returns the first element of the list of renderers attached to the SDM engine. All but the last element of this list are instances of subclasses of IlvFilterSDMRenderer. You can retrieve the next element of the list by calling the method getFilteredRenderer. The last element of the list is usually the StyleSheet renderer, which is an instance of the class IlvStyleSheetRenderer.
To make it easier to retrieve a particular renderer, the class IlvRendererUtil provides a static method getRenderer that looks up a renderer by its name in the chained list.
The following code example shows how to retrieve the LinkLayout renderer.
Retrieving a renderer in Java code (symbolic name)
IlvSDMEngine engine = ...;
IlvLinkLayoutRenderer r = (IlvLinkLayoutRenderer)
    IlvRendererUtil.getRenderer(engine, "LinkLayout");
The name passed to the getRenderer method can be either the symbolic name of the renderer (the name that is used in the style sheet) as shown in Retrieving a renderer in Java code (symbolic name) or the full class name of the renderer as shown in the following code example.
Retrieving a renderer in Java code (class name)
IlvSDMEngine engine = ...;
IlvLinkLayoutRenderer r = (IlvLinkLayoutRenderer)
    IlvRendererUtil.getRenderer(engine,
                                IlvLinkLayoutRenderer.class.getName());