Preserve Fixed Links

At times, you may want some links of the graph to be “pinned” (that is, to stay in their current shape when the layout is performed). You need a way to indicate the links that the layout algorithm cannot reshape. This makes sense especially when using a Semi-automatic layout (the method where the end user fine tunes the layout by hand after the layout is completed) or when using an Incremental layout (the method where the graph and/or the shape of the links is modified after the layout has been performed and then the layout is performed again).

Views allows you to specify that a link is fixed using the method:

void IlvGraphLayout::setFixed(IlAny link, IlBoolean fixed)

If fixed is IlTrue, it means that the link is fixed. To obtain the current setting for a link:

IlBoolean IlvGraphLayout::isFixed(IlAny link) const

The default value is IlFalse.

To remove the fixed attribute from all links in the grapher, use the method:

void IlvGraphLayout::unfixAllLinks()

Note

The fixed attributes you may have set will be taken into consideration only if you call the method void IlvGraphLayout::setPreserveFixedLinks(IlBoolean option) with an IlTrue argument.

You can read the current option using the method:

IlBoolean IlvGraphLayout::isPreserveFixedLinks() const

To indicate whether a subclass of IlvGraphLayout supports this mechanism, the following method is provided:

IlBoolean IlvGraphLayout::supportsPreserveFixedLinks() const

The default implementation returns IlFalse. A subclass can override this method in order to return IlTrue to indicate that this mechanism is supported.