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

The GrapherPin renderer defines the exact positions where links will be connected to the nodes of the graph. For example, Code Sample 4.12 shows a rule which declares that a node of tag split has three connection points: one at the top of the node's bounding rectangle, one on the left, and another one on the right.

node.split {
  GrapherPin[0] : "Top";
  GrapherPin[1] : "Left";
  GrapherPin[2] : "Right";
}

Code Sample 4.12 Specifying Link Connection Points in the Style Sheet

Other rules can then make use of the connection points defined to specify where different types of links are to be connected. For example, Code Sample 4.13 shows a rule that connects all links of tag transition whose condition property is true from the right of the source node to the top of the destination node.

link.transition[condition="true"] {
  FromPin : "2";   // pin #2 = Right (see node.split rule)
  ToPin : "0";     // pin #0 = Top (see node.split rule)
}

Code Sample 4.13 Specifying How the Ends of a Transition Link Are Connected

The grapher pins are taken into account during editing when you create a new link or when you reconnect an existing link. They are displayed as small circles during the interaction.

The GrapherPin renderer does not have any global properties.

Table 4.5 lists the per-object rendering properties of the GrapherPin renderer.

Table 4.5 Per-Object Properties of the GrapherPin Renderer 
Property 
Type 
Default 
Description 
FromPin 
int 

 
The grapher pin to which the link will be connected on the source node. The value of the property is the index n of the GrapherPin[n] property of the node, and the GrapherPin[n] entry specifies the connection point. 
GrapherPin[n
position, or x,y 

 
The grapher pin of index n for this node. The value of the property can be either a position relative to the node's bounding box (for example: Top, BottomLeft) or an x, y couple, indicating the relative X and Y offsets of the grapher pin (0 = left or top, 1 = bottom or right, 0.5 = center). 
ToPin 
int 

 
The grapher pin to which the link will be connected on the destination node. The value of the property is the index n of the GrapherPin[n] property of the node. 

For more details, see the class ilog.views.sdm.renderer.IlvGrapherPinRenderer.