GoDiagram is currently in beta -- See here for details, or contact us if you have questions or feedback.

Class GenericNetwork<V, E, Y>.Edge

GoDiagram
v10.0.0-beta6
by Northwoods Software®

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

Inheritance
System.Object
GenericNetwork<V, E, Y>.Edge
Namespace: Northwoods.Go.Layouts
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class 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 GenericNetwork there is a subclass of GenericNetwork<V, E, Y>.Vertex and a subclass of GenericNetwork<V, E, Y>.Edge:

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

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

Constructors

Edge(GenericNetwork<V, E, Y>)

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

Declaration
public Edge(GenericNetwork<V, E, Y> network)
Parameters
Type Name Description
GenericNetwork<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
System.Object

FromVertex

Gets or sets the GenericNetwork<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.

Item[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
System.String prop

the property name, which must begin with a _

Property Value
Type Description
System.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 GenericNetwork<V, E, Y> that owns this edge.

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

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

ToVertex

Gets or sets the GenericNetwork<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