GoDiagram Web Reference
GoLink Class
Members  Example 

This class provides a standard implementation of IGoLink as a GoObject.
Syntax
'Declaration
 
<SerializableAttribute()>
Public Class GoLink 
   Inherits GoStroke
   Implements IGoGraphPartIGoIdentifiablePartIGoLinkIGoRoutable 
Remarks
A GoLink is a GoStroke that connects two GoPorts. Make a link by constructing a link, setting both the F:Northwoods.GoWeb.GoStrokeStyle.Bezier%, it takes the GoStroke.Curviness into account to automatically give the link a curve.

When the link is Orthogonal, it is common to set the style to RoundedLine. Then the GoStroke.Curviness property controls the size of the corners in the link.

Whenever either port is moved (normally because the port's parent node moved), CalculateStroke is called again. By default this will calculate all of the stroke points again. However, if you set the AdjustingStyle property, CalculateStroke will take the old path into account in calculating the new path.

Example
Typical programmatic usage might be something like:
GoBasicNode node1 = new GoBasicNode();
node1.LabelSpot = GoObject.Middle;
node1.Text = "basic node 1";
node1.Shape.BrushColor = Color.LightGreen;
node1.Location = new PointF(75, 50);
goView1.Document.Add(node1);
            
GoBasicNode node2 = new GoBasicNode();
node2.LabelSpot = GoObject.Middle;
node2.Text = "basic node 2";
node2.Shape.BrushColor = Color.LightYellow;
node2.Location = new PointF(200, 50);
goView1.Document.Add(node2);
            
GoLink link = new GoLink();
link.ToArrow = true;
link.FromPort = node1.Port;
link.ToPort = node2.Port;
goView1.Document.Add(link);
Inheritance Hierarchy

System.Object
   Northwoods.GoWeb.GoObject
      Northwoods.GoWeb.GoShape
         Northwoods.GoWeb.GoStroke
            Northwoods.GoWeb.GoLink

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoLink Members
Northwoods.GoWeb Namespace

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback