This layout stage can be used to enforce that a layout algorithm will not change the relative coordinates of ports that are associated with a strong/fixed port constraint.

Namespace: yWorks.yFiles.Layout
Assembly: yWorks.yFilesNET.Algorithms (in yWorks.yFilesNET.Algorithms.dll) Version: 4.1.0.1 (4.1.0.1)

Syntax

C#
public class PortConstraintEnforcementStage : AbstractLayoutStage
Visual Basic
Public Class PortConstraintEnforcementStage _
	Inherits AbstractLayoutStage

Remarks

This layout stage can be used to enforce that a layout algorithm will not change the relative coordinates of ports that are associated with a strong/fixed port constraint. Usage:
            //prepare port constraints
            graph.addDataProvider(PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY, createSPCs(graph));
            graph.addDataProvider(PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY, createTPCs(graph));
            //create layout pipeline
            OrganicLayouter layouter = new OrganicLayouter();
            PortConstraintEnforcementStage stage = new PortConstraintEnforcementStage();
            stage.setCoreLayouter(organic);
            //launch algorithms
            new BufferedLayouter(stage).doLayout(graph);
            

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Layout..::..AbstractLayoutStage
    yWorks.yFiles.Layout..::..PortConstraintEnforcementStage

See Also