This class represents a constraint for either a source or target port
of an edge.
Namespace: yWorks.yFiles.LayoutAssembly: yWorks.yFilesNET.Algorithms (in yWorks.yFilesNET.Algorithms.dll) Version: 4.1.0.1 (4.1.0.1)
Syntax
| C# |
|---|
public class PortConstraint |
| Visual Basic |
|---|
Public Class PortConstraint |
Remarks
This class represents a constraint for either a source or target port
of an edge. Objects of type PortConstraint are expected to be returned by
data providers that are registered by the keys defined in the
interface
PortConstraintKeys
.
A port constraint expresses at what position an edge is allowed
to connect to either its source or target node.
A weak port constraint limits the position of the port
to a particular side of a node.
Additionally, a strong port constraint fixes the position of the
port completely to the position of the current port coordinates.
For example, PortConstraint p = PortConstraint.create(PortConstraint.NORTH)
expresses that an edge should connect at the north side of a node. It is
a weak constraint.
On the other hand p = PortConstraint.create(PortConstraint.NORTH, true)
expresses that an edge should not only connect at the north side of a node
but also should use the current port coordinates. This is a strong constraint.
Inheritance Hierarchy
System..::..Object
yWorks.yFiles.Layout..::..PortConstraint
yWorks.yFiles.Layout..::..PortConstraint