Combining multiple and recursive layout

Often, the Multiple Layout is used inside a Recursive Layout. For convenience, Rogue Wave® JViews provides a layout algorithm that combines both mechanisms: the Recursive Multiple Layout. This is a Recursive Layout (see Recursive layout) that uses an instance of Multiple Layout for each subgraph.
To apply a Tree Layout, a Link Layout, and an Annealing Label Layout recursively on a nested graph, you can use:
IlvRecursiveMultipleLayout layout = new IlvRecursiveMultipleLayout(
                                  new IlvTreeLayout(),
                                  new IlvLinkLayout(),
                                           new IlvAnnealingLabelLayout());
This is in principle the same as a Recursive Layout that has a Multiple Layout as a reference layout:
IlvRecursiveLayout layout = new IlvRecursiveLayout(
                            new IlvMultipleLayout(
                            new IlvTreeLayout(),
                            new IlvLinkLayout(),
                                   new IlvAnnealingLabelLayout()));
The Recursive Multiple Layout has a first and second graph layout instance per subgraph, and a label layout instance per subgraph. You access these instances by the following methods:
  • IlvGraphLayout getFirstGraphLayout(Object subgraph)
    which returns the graph layout that is applied first to the subgraph.
  • IlvGraphLayout getSecondGraphLayout(Object subgraph)
    which returns the graph layout that is applied secondly to the subgraph.
  • IlvLabelLayout getLabelLayout(Object subgraph)
    which returns the label layout that is applied last to the subgraph.
If the subgraph parameter is null in these methods, the layout instances of the top-level graph are returned.