Class PolylineLinkingTool

GoDiagram®
v10.0.8
by Northwoods Software®

The PolylineLinkingTool class the user to draw a new Link by clicking where the route should go, until clicking on a valid target port.

Inheritance
PolylineLinkingTool
Namespace: Northwoods.Go.Tools.Extensions
Assembly: PolylineLinkingWinForms.dll
Syntax
public class PolylineLinkingTool : LinkingTool
Remarks

This tool supports routing both orthogonal and straight links. You can customize the TemporaryLink as needed to affect the appearance and behavior of the temporary link that is shown during the linking operation. You can customize the ArchetypeLinkData to specify property values that can be data-bound by your link template for the Links that are actually created.

Constructors

PolylineLinkingTool()

Constructs an PolylineLinkingTool, sets PortGravity to 0, and sets the name for the tool.

Declaration
public PolylineLinkingTool()

Methods

DoActivate()

Use a "crosshair" cursor.

Declaration
public override void DoActivate()
Overrides

DoKeyDown()

This supports the "Z" command during this tool's operation to remove the last added point of the route. Type ESCAPE to completely cancel the operation of the tool.

Declaration
public override void DoKeyDown()
Overrides

DoMouseDown()

Add a point to the route that the temporary Link is accumulating.

Declaration
public override void DoMouseDown()
Overrides
Northwoods.Go.Tools.LinkingBaseTool.DoMouseDown()

DoMouseMove()

Have the temporary link reach to the last mouse point.

Declaration
public override void DoMouseMove()
Overrides

DoMouseUp()

If this event happens on a valid target port (as determined by FindTargetPort(bool)), we complete the link drawing operation.

Declaration
public override void DoMouseUp()
Overrides
Remarks

InsertLink(Node, GraphObject, Node, GraphObject) is overridden to transfer the accumulated route drawn by user clicks to the new Link that was created.

If this event happens elsewhere in the diagram, this tool is not stopped: the drawing of the route continues.

This method overrides the standard link creation method by additionally replacing the default link route with the custom one laid out by the user.

Declaration
public override Link InsertLink(Node fromnode, GraphObject fromport, Node tonode, GraphObject toport)
Parameters
Type Name Description
Node fromnode
GraphObject fromport
Node tonode
GraphObject toport
Returns
Type Description
Link
Overrides