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.LayoutAssembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 2.1.0.2
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
yWorks.yFiles.Layout..::..AbstractLayoutStage
yWorks.yFiles.Layout..::..PortConstraintEnforcementStage