Header part

The class FlagRenderer extends IlvFilterSDMRenderer, so it does not need to redefine all unused renderer methods.
The following code example shows the packages imported and the class declaration.
The statements for the class
package tutorial;
import ilog.views.sdm.*;
import ilog.views.sdm.model.*;
import ilog.views.sdm.graphic.*;
import ilog.views.sdm.renderer.*;

import ilog.views.*;
import ilog.views.graphic.*;
/**
 * The class <code>FlagRenderer</code> is a filtering renderer that
 * sticks various IlvGraphic (the flags) to a node.  Flags are located
 * in a separate layer, typically over all other layers to have them
 * always visible.

 * <P>This renderer defines the following graphic properties:
 * <UL>
 * <LI>Flag: an  IlvGraphic that represents the decorations<\LI>
 * <\UL>
 * */
public class FlagRenderer  extends IlvFilterSDMRenderer 
{
The following code example shows the internal variables and the constructors.
Internal variables and constructors
    private int _flagLayer = 20;
    static final String[] REND_CLASS = {"renderer", "flagRenderer" };
    static final String FLAG = "Flag";
    static final String FLAG_GRAPHICS = "Flag-graphic";
    //////////////////////
    // constructors

  /**
   * Creates a new flag renderer for a specified
   * filtered renderer.
   */
  public FlagRenderer(IlvSDMRenderer renderer) {
    super(renderer);
  }
  
  /**
   * Creates a new flag renderer with a <code>null</code>
   * filtered renderer.
   */
  public FlagRenderer(){
    this(null);
  }

The internal variables are as follows:
  • _flagLayer is the layer where the flags will be added.
  • REND_CLASS is the CSS pseudo-class of this renderer, for use in the style sheet.
  • The other constants set string literals.