This class represents a constraint for either a source or target port of an edge.

Namespace: yWorks.yFiles.Layout
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 2.4.0.0

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

See Also