Accessing sublayouts of subgraphs

Internally, the graph layout renderer uses a different instance of IlvGraphLayout for each nested graph. In Accessing graph layout instances, we mentioned how to access the layout instance of the node layout renderer:
nodeLayoutRenderer.getGraphLayout();
This returns the layout instance of the top-level grapher.
The following example shows how to access all graph layout instances of all subgraphs.
IlvSDMEngine engine = diagrammer.getEngine();
Enumeration e = engine.getNodeLayoutRenderer().getLayouts(engine, true);
while (e.hasMoreElements()) {
  IlvGraphLayout layout = (IlvGraphLayout)e.nextElement();
  ... do something with this layout instance ...
}
You can also access the layout instance of an individual subgrapher, by using the following method of IlvGraphLayoutRenderer:
getGraphLayout(IlvSDMEngine engine, IlvGrapher grapher);
The mechanism for accessing the different link layout instances of a link layout renderer is exactly the same.
The API of the graph layout and link layout renderers is documented in the Java™ API Reference Manual of the classes IlvGraphLayoutRenderer and IlvLinkLayoutRenderer.