Search this API

Interface LayeredComponentsMerger

All Known Implementing Classes:

public interface LayeredComponentsMerger

This interface merges two Layers 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 HierarchicLayouter and MultiComponentLayerer when e.g. the graph is grouped or it consists of more than one connected component.


Method Summary
 void merge(LayoutGraph graph, LayoutDataProvider ldp, Layers srcLayers, Layers targetLayers)
          Merges two Layers instances.

Method Detail


void merge(LayoutGraph graph,
           LayoutDataProvider ldp,
           Layers srcLayers,
           Layers targetLayers)
Merges two Layers instances.

All nodes that belong to the source and target Layers are part of the graph at the moment of invocation.

The state of the source Layers instance is discarded after this call and does not need to be updated to reflect the changes. The target Layers instance must be updated accordingly.

graph - the graph containing the nodes of source and target Layers instances
ldp - the LayoutDataProvider used for querying the layer indices
srcLayers - the source Layers instance that will be merged into the target Layers instance
targetLayers - the Layers instance that will be modified to contain the resulting layering

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.