public interface ILayeredComponentsMerger
ILayers
instances whose nodes reside in the same graph.
Implementations of this interface may provide different strategies for merging.
Default implementations
of this interface are used internally by HierarchicLayoutCore
and MultiComponentLayerer
when e.g. the graph is grouped or it consists of more than one connected component.
Modifier and Type | Method and Description |
---|---|
void |
merge(LayoutGraph graph,
ILayoutDataProvider ldp,
ILayers srcLayers,
ILayers targetLayers)
Merges two
ILayers instances. |
void merge(LayoutGraph graph, ILayoutDataProvider ldp, ILayers srcLayers, ILayers targetLayers)
ILayers
instances.
All nodes that belong to the source and target ILayers
are part of the graph at the moment of invocation.
The state of the source ILayers
instance is discarded after this call and does not need to be updated to reflect
the changes. The target ILayers
instance must be updated accordingly.
graph
- the graph containing the nodes of source and target ILayers
instancesldp
- the ILayoutDataProvider
used for querying the layer indicessrcLayers
- the source ILayers
instance that will be merged into the target ILayers
instancetargetLayers
- the ILayers
instance that will be modified to contain the resulting layering