ForceDirectedNetwork class

This class represents an abstract graph of ForceDirectedVertexes and ForceDirectedEdges that can be constructed based on the Nodes and Links of a Diagram so that the ForceDirectedLayout can operate independently of the diagram until it is time to commit any node positioning or link routing.

This class inherits from LayoutNetwork.

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

ForceDirectedNetwork(ForceDirectedLayout layout)
factory

Properties

edges Set<LayoutEdge>

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Gets a collection of all of the LayoutEdges in this network. Do not modify this collection directly. Instead, call #addEdge, #deleteEdge, #addLink, or #deleteLink.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
layout Layout

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Gets the Layout that uses this network of LayoutVertexes and LayoutEdges. The default value is null. It is set automatically for you when this setting Layout#network.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vertexes Set<LayoutVertex>

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Gets a collection of all of the LayoutVertexes in this network. Do not modify this collection directly. Instead, call #addVertex, #deleteVertex, #addNode, or #deleteNode.
getter/setter pair

Methods

addEdge(LayoutEdge edge) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Adds a LayoutEdge to the network. Although this method is provided for completeness, #linkVertexes provides a more efficient manner of linking vertexes already in the network. @param {LayoutEdge} edge

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

This convenience method makes sure there is a LayoutEdge in this network corresponding to a Link. If #findEdge returns null, this method creates a new LayoutEdge, makes sure the Link#fromNode and Link#toNode have corresponding LayoutVertexes in the network, and adds the edge itself to the network. @param {Link} link @return {LayoutEdge} an edge in this network.
addNode(Node node) LayoutVertex

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

This convenience method makes sure there is a LayoutVertex in this network corresponding to a Node. @param {Node} node @return {LayoutVertex} a vertex in this network.
addParts(Iterable<Part> parts, [bool? toplevelonly, bool pred(Part)?]) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Creates a network of LayoutVertexes and LayoutEdges corresponding to the given Nodes and Links. This is usually more convenient than repeatedly calling #addNode and #addLink. This method ignores all instances of Parts that are not Nodes or Links. This will recurse through Groups that have no Group#layout. @param {Iterable.
addVertex(LayoutVertex vertex) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Adds a LayoutVertex to the network. @param {LayoutVertex} vertex
createEdge() LayoutEdge

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Allocate a new instance of LayoutEdge. This is overridden in LayoutNetwork subclasses to create instances of subclasses of LayoutEdge. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @return {LayoutEdge}
createVertex() LayoutVertex

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Allocate a new instance of LayoutVertex. This is overridden in LayoutNetwork subclasses to create instances of subclasses of LayoutVertex. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @return {LayoutVertex}
deleteArtificialVertexes() → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Deletes all vertexes and edges that have no Part associated with them. @expose
deleteEdge(LayoutEdge edge) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Removes a LayoutEdge from the network. @param {LayoutEdge} edge

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

This convenience method deletes from this network any LayoutEdge corresponding to a Link. @param {Link} link
deleteNode(Node node) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

This convenience method deletes any LayoutVertex corresponding to a Node. @param {Node} node
deleteSelfEdges() → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Deletes all LayoutEdges whose "to vertex" and "from vertex" are the same vertex.
deleteVertex(LayoutVertex vertex) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Removes a LayoutVertex from the network. This function also deletes all edges to or from the vertex. @param {LayoutVertex} vertex
findAllParts() Set<Part>

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Retrieve all of the Nodes and Links from the LayoutVertexes and LayoutEdges that are in this network. @return {Set.
findEdge(Link link) LayoutEdge?

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Returns the LayoutEdge that was constructed for the Link. @param {Link} link @return {LayoutEdge} an edge in this network, or null if no such edge exists.
findVertex(Node node) LayoutVertex?

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Returns the LayoutVertex that was constructed for the Node. @param {Node} node @return {LayoutVertex} a vertex in this network, or null if no such vertex exists.
linkVertexes(LayoutVertex fromVertex, LayoutVertex toVertex, [Link? link]) LayoutEdge

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Links two vertexes already in the network and returns the created LayoutEdge. @param {LayoutVertex} fromVertex @param {LayoutVertex} toVertex @param {Link} link @return {LayoutEdge} an edge in this network, or null if both vertexes don't exist.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverseEdge(LayoutEdge edge) → void

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

Reverses the direction of a LayoutEdge in the network. @param {LayoutEdge} edge
splitIntoSubNetworks([bool? clean]) List<LayoutNetwork>

Available on LayoutNetwork, provided by the LayoutNetwork$Typings extension

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.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited