Developing with the SDK > Using and Adding Renderers > Predefined Renderers > The Map StyleSheet Renderer

The Map StyleSheet renderer is the a specific version of The StyleSheet Renderer. You need to have ILOG JViews Maps installed with a valid license to be able to use this renderer.

The Map StyleSheet renderer wraps the node and link layers into an IlvMapLayer object. This is done in order for them to be managed by the maps layer tree. For example, this allows the following:

In a JViews Maps application you have to enable the Map StyleSheet renderer using Java code before you make any use of a style sheet. The following code example shows how to replace the StyleSheet renderer:

 // replace the stylesheet renderer with map rendererclass.
 IlvRendererUtil.addRendererAlias(
 IlvRendererUtil.getRendererAlias(IlvStyleSheetRenderer.class.getName()),
 IlvMapStyleSheetRenderer.class.getName());

The Map StyleSheet renderer provides exactly the same properties as the StyleSheet Renderer. However, any use of the nodesLayer, linksLayer or Layer properties will be overridden by the Map Layer tree order. Table 4.25 lists the Map StyleSheet renderer properties.

Table 4.25 The Map StyleSheet Renderer Global Properties
Property 
Type 
Default 
Description 
debugMask 
int
0
Prints selected debug information. 
styleSheets 
String[]
null
Sets cascading style sheets. This property is usually set on the SDM engine rather than directly on the StyleSheet renderer. 
linkConnectorEnabled  
boolean
true
Specifies if a link connector should be installed to connect the links to the sides of the nodes, rather than to their centers. 
addingLinkConnectors  
boolean
true
If false, no link connector is installed by the style sheet renderer. 

Table 4.26 lists the Map StyleSheet renderer per-object rendering properties.

Table 4.26 The Map StyleSheet Renderer Per-Object Proprieties
Property 
Type 
Default 
Description 
Anchor  
int
Center 
The position of the object's location relative to its bounding box (for example, Top Left? will place the object so that its upper-left corner is located at the x, y position). 
LinkConnector  
IlvLinkConnector 

 
Defines the link connector set on the nodes of the graph. By default, an IlvSDMLinkConnector object is used. 
ToolTipText  
String
null 
float 

 
The horizontal coordinate of the object. 
float 

 
The vertical coordinate of the object. 
width 
int 

 
height 
int 

 
The height of the object. If the height is not specified in the style sheet file, and if it is specified in the data model XML file, the value contained in the XML file will be used. See IlvSDMRenderer.getGraphicProperty for details.