Class LayoutNetwork

This provides an abstract view of a diagram as a network (graph) of vertexes and directed edges. The network contains vertexes and edges corresponding to Nodes and Links.

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): LayoutNetwork

This constructs an empty network.

Returns

LayoutNetwork

Properties

public edges: Set

Gets a collection of all of the LayoutEdges in this network.

public layout: Layout

Gets the Layout that uses this network of LayoutVertexes and LayoutEdges.

public vertexes: Set

Gets a collection of all of the LayoutVertexes in this network.

Methods

public addEdge(edge: LayoutEdge): any

Adds a LayoutEdge to the network.

Parameters

Returns

any

public addLink(link: Link): LayoutEdge

This convenience method makes sure there is a LayoutEdge in this network corresponding to a Link.

Parameters

Returns

LayoutEdge

public addNode(node: Node): LayoutVertex

This convenience method makes sure there is a LayoutVertex in this network corresponding to a Node.

Parameters

Returns

LayoutVertex

public addParts(parts: Iterable, toplevelonly?: boolean): any

Creates a network of LayoutVertexes and LayoutEdges corresponding to the given Nodes and Links.

Parameters

  • parts: Iterable

    A collection of Nodes or Links.

  • toplevelonly?: boolean optional

    whether to skip Parts in the given collection that are contained by Groups.

Returns

any

public addVertex(vertex: LayoutVertex): any

Adds a LayoutVertex to the network.

Parameters

Returns

any

public createEdge(): LayoutEdge

Allocate a new instance of LayoutEdge.

Returns

LayoutEdge

public createVertex(): LayoutVertex

Allocate a new instance of LayoutVertex.

Returns

LayoutVertex

public deleteArtificialVertexes(): any

Deletes all vertexes and edges that have no Part associated with them.

Returns

any

public deleteEdge(edge: LayoutEdge): any

Removes a LayoutEdge from the network.

Parameters

Returns

any

public deleteLink(link: Link): any

This convenience method deletes from this network any LayoutEdge corresponding to a Link.

Parameters

Returns

any

public deleteNode(node: Node): any

This convenience method deletes any LayoutVertex corresponding to a Node.

Parameters

Returns

any

public deleteSelfEdges(): any

Deletes all LayoutEdges whose "to vertex" and "from vertex" are the same vertex.

Returns

any

public deleteVertex(vertex: LayoutVertex): any

Removes a LayoutVertex from the network.

Parameters

Returns

any

public findAllParts(): Set

Retrieve all of the Nodes and Links from the LayoutVertexes and LayoutEdges that are in this network.

Returns

Set

public findEdge(link: Link): LayoutEdge

Returns the LayoutEdge that was constructed for the Link.

Parameters

Returns

LayoutEdge

public findVertex(node: Node): LayoutVertex

Returns the LayoutVertex that was constructed for the Node.

Parameters

Returns

LayoutVertex

public linkVertexes(fromVertex: LayoutVertex, toVertex: LayoutVertex, link: Link): LayoutEdge

Links two vertexes already in the network and returns the created LayoutEdge.

Parameters

Returns

LayoutEdge

public reverseEdge(edge: LayoutEdge): any

Reverses the direction of a LayoutEdge in the network.

Parameters

Returns

any

public splitIntoSubNetworks(): List

Modify this network by splitting it up into separate subnetworks, each of which has all of its vertexes connected to each other, but not to any vertexes in any other subnetworks.

Returns

List