Class Network<V, E, Y>.Edge

GoDiagram®
v10.0.8
by Northwoods Software®

An edge represents a Link in a Network<V, E, Y>, along with its FromVertex and ToVertex.

Namespace: Northwoods.Go.Layouts
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class Network<V, E, Y>.Edge
Remarks

The Link property may be null for edges that represent "dummy" links, when the layout wants to work with a network that is not isomorphic with the collection of Nodes and Links being laid out.

It holds layout-specific data for the link. For each kind of layout that uses a Network there is a subclass of Network<V, E, Y>.Vertex and a subclass of Network<V, E, Y>.Edge:

  • : and
  • : and
  • : and
  • : and

Modifying a Network<V, E, Y> or a Network<V, E, Y>.Vertex or an Network<V, E, Y>.Edge does not invalidate the Layout or raise any changed events.

Constructors

Edge(Network<V, E, Y>)

This constructs an edge that does not know about any Link and sets its network.

Declaration
public Edge(Network<V, E, Y> network)
Parameters
Type Name Description
Network<V, E, Y> network

Properties

Data

For virtualized layouts working on model data instead of a Link.

Declaration
public object Data { get; set; }
Property Value
Type Description
object

FromVertex

Gets or sets the Network<V, E, Y>.Vertex that this edge comes from.

Declaration
public V FromVertex { get; set; }
Property Value
Type Description
V
Remarks

Setting this property does not change any DestinationEdges collection.

this[string]

This index operator allows for access to programmer-defined properties stored in a Dictionary<string, object>.

Declaration
public object this[string prop] { get; set; }
Parameters
Type Name Description
string prop

the property name, which must begin with a _

Property Value
Type Description
object

Gets or sets the Link associated with this edge, if any.

Declaration
public Link Link { get; set; }
Property Value
Type Description
Link

The value may be null if this edge is a "dummy" edge, not represented by a real Link in the Diagram.

Network

Gets the Network<V, E, Y> that owns this edge.

Declaration
public Network<V, E, Y> Network { get; set; }
Property Value
Type Description
Network<V, E, Y>
Remarks

The default value is null. It is set automatically for you in CreateEdge().

ToVertex

Gets or sets the Network<V, E, Y>.Vertex that this edge goes to.

Declaration
public V ToVertex { get; set; }
Property Value
Type Description
V
Remarks

Setting this property does not change any SourceEdges collection.

Methods

Commit()

Commits the route of this edge to the corresponding Link, if any.

Declaration
public virtual void Commit()
Remarks

By default this does nothing. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

GetOtherVertex(V)

Returns the edge's vertex at the other of this edge from the given vertex.

Declaration
public V GetOtherVertex(V v)
Parameters
Type Name Description
V v
Returns
Type Description
V