DiagramLite Programmer's Guide
ConnectionPoint Members
Constructors Properties Methods
 


This class represents a connection between an edge and a node in a graph. It decouples the DiagramLink class from the DiagramNode class, allowing edges to connect different types of nodes without knowing anything of their implementation details. Each DiagramLink object contains two ConnectionPoint instances describing the connections at both ends of the link.

The following tables list the members exposed by the ConnectionPoint type.

 Public Constructors

  Name Description

ConnectionPoint

Initializes a new instance of the ConnectionPoint class between the specified node and link.

 Public Properties

  Name Description

AnchorPointIndex

Gets or sets the index of the destination anchor point within the AnchorPattern that contains it.

RelativePosition

Gets or sets the position of this connection point, relative to the associated node's bounding rectangle, expressed in percents.

Row

Gets the index of a constituent item within the associated node where the link represented by this connection point is connected, or -1, if the link is connected to the node itself.

 Protected Properties

  Name Description

Incoming

Gets a flag indicating whether this connection point is at the origin or the destination of the associated link.

Link

Gets the link associated with this connection point.

Node

Gets the node associated with this connection point.

 Public Methods

  Name Description

AddLinkToNode

Adds the link associated with this connection point to the associated node.

GetAnchorPos

Returns the point from the node's associated anchor pattern (if any) with the specified index or the link's initial point.

GetEndPoint

Calculates the coordinates of this connection point expressed in document coordinates.

GetInitialPoint

Returns a point (usually the center of the bounding rectangle) contained within the associated node.

GetIntersection

Calculates the intersection point between the specified line segment and the contour of the node associated with this connection point.

GetNodeRect

Returns the bounding rectangle of the node associated with this connection point.

LinkChanges

Checks whether the link would change if attached to the specified node at the specified point.

NodesIntersect

Checks whether the node associated with the current connection point and the node associated with the specified connection point intersect.

RemoveLinkFromNode

Removes the link associated with this connection point from the associated node.

SaveEndRelative

Updates the coordinates of the connection point represented by this link, relative to the bounding rectangle of the associated node.

UpdateRow

Sets the row within the table this connection point should be associated with.

 Protected Methods

  Name Description

GetNearestAnchorPoint

Returns the nearest anchor point pertinent to this connection.

GetNearestBorderPoint

Returns the nearest point lying on the node border.

 See Also

ConnectionPoint Class
MindFusion.Diagramming Namespace