The specified provider mode can be used if
you want to perform graph layout on a nested graph and either you
want individual global layout parameters for specific subgraphs or
you want to lay out different subgraphs with different styles. It
is your responsibility to manage the specified layout provider
(unlike the case with the internal provider mode), but this is
probably only necessary in very advanced applications.
Specified provider mode has no reference
layout. You allocate the Recursive Layout by using the constructor
with your layout provider as argument:
IlvRecursiveLayout(IlvLayoutProvider specifiedProvider)
You can access the current layout provider
by:
IlvLayoutProvider getLayoutProvider()
You should implement your layout provider in
such a way that it delivers a different layout instance for each
subgraph. The delivered layout instance must be attached to the
graph model of the corresponding subgraph.
Because there is no reference layout, global
layout parameters are independent for each subgraph. It is
recommended that the implementation of the layout provider takes
care of the setting of global and local layout parameters.
Theoretically, you can use the method:
IlvGraphLayout getLayout(Object subgraph)
which will return the layout instance that the specified layout
provider delivers for the graph model of the input subgraph. If you
pass
null
as subgraph, you get the layout instance of the top-level graph.
The effect of this method depends on the implementation of the
layout provider that was passed to the constructor of Recursive
Layout.
The layout instances of the subgraphs used
during recursive layout should be attached by the layout provider.
They are usually not automatically detached when the Recursive
Layout is detached.
Unless you use one of the predefined providers of class
IlvDefaultLayoutProvider
or
IlvRecursiveLayoutProvider
, you should traverse all layouts and detach them explicitly.