Table of Contents

Class Network<V, E, Y>.Edge

Namespace
Northwoods.Go.Layouts
Assembly
Northwoods.GoDiagram.WinForms.dll

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

public class Network<V, E, Y>.Edge
Inheritance
Network<V, E, Y>.Edge
Derived
Inherited Members

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:

  • CircularLayout: CircularVertex and CircularEdge
  • ForceDirectedLayout: ForceDirectedVertex and ForceDirectedEdge
  • LayeredDigraphLayout: LayeredDigraphVertex and LayeredDigraphEdge
  • TreeLayout: TreeVertex and TreeEdge

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.

public Edge(Network<V, E, Y> network)

Parameters

network Network<V, E, Y>

Properties

Data

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

public object Data { get; set; }

Property Value

object

FromVertex

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

public V FromVertex { get; set; }

Property Value

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>.

public object this[string prop] { get; set; }

Parameters

prop string

the property name, which must begin with a _

Property Value

object

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

public Link Link { get; set; }

Property Value

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.

public Network<V, E, Y> Network { get; set; }

Property Value

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.

public V ToVertex { get; set; }

Property Value

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.

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.

public V GetOtherVertex(V v)

Parameters

v V

Returns

V