Connector style (TL)

The layout algorithm automatically positions the end points of links (the connector pins) at the nodes. The connector style parameter specifies how these end points are calculated for the outgoing links at the parent node.
By default, the connector style determines how the connection points of the links are distributed on the border of the bounding box of the nodes, symmetrically with respect to the middle of each side.
A sample
graph shown with each connector pin style in turn: centered and evenly
spaced for direct and orthogonal links
Connector styles
To specify the connector style:
Use the method setConnectorStyle:
treeLayout.setConnectorStyle(ibm_ilog.graphlayout.tree.TreeLayout.CENTERED_PINS);   
The valid values for connectorStyle are:
  • ibm_ilog.graphlayout.tree.TreeLayout.CENTERED_PINS
    The end points of the links are placed in the center of the border where the links are attached.
  • ibm_ilog.graphlayout.tree.TreeLayout.EVENLY_SPACED_PINS
    The connector pins are evenly distributed along the node border. This style works for straight and orthogonal links.
  • ibm_ilog.graphlayout.tree.TreeLayout.AUTOMATIC_PINS
    The connector style is selected automatically depending on the link style and the layout mode. In nonradial modes, the algorithm always chooses centered pins. In radial layout modes, it clips the pins at the bounding box of the nodes.
The connector style and the link connection box interface work together in the following way: by applying the connector style, the proposed connection points are calculated on the rectangle obtained from the link connection box interface (or on the bounding box of the node, if no link connection box interface was specified).
The following figure shows an example of the combined effect.
If the links are connected to the pink node in the figure (left), they appear unsymmetrical with respect to the node shape, because the relevant part of the node (here: the upper rhombus) is not in the center of the bounding box of the node, but the proposed connection points are calculated with respect to the bounding box.
Picture
illustrating the effect of the link connection box in combination
with link clipping
Combined effect of clipping and link connection box
It can be corrected by using a link connection box interface to explicitly specify a smaller connection box for the relevant part of the node (previous figure, right) such that the proposed connection points are placed symmetrically at the upper rhombus of the node.