LayoutNetwork$Typings extension
Properties
-
edges
↔ Set<LayoutEdge>
-
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
-
layout
↔ Layout
-
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
-
vertexes
↔ Set<LayoutVertex>
-
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
-
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
-
addLink(Link link)
→ LayoutEdge
-
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
-
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
-
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
-
Adds a LayoutVertex to the network.
@param {LayoutVertex} vertex
-
createEdge()
→ LayoutEdge
-
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
-
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
-
Deletes all vertexes and edges that have no Part associated with them.
@expose
-
deleteEdge(LayoutEdge edge)
→ void
-
Removes a LayoutEdge from the network.
@param {LayoutEdge} edge
-
deleteLink(Link link)
→ void
-
This convenience method deletes from this network any LayoutEdge
corresponding to a Link.
@param {Link} link
-
deleteNode(Node node)
→ void
-
This convenience method deletes any LayoutVertex
corresponding to a Node.
@param {Node} node
-
deleteSelfEdges()
→ void
-
Deletes all LayoutEdges whose "to vertex" and "from vertex" are the same vertex.
-
deleteVertex(LayoutVertex vertex)
→ void
-
Removes a LayoutVertex from the network.
This function also deletes all edges to or from the vertex.
@param {LayoutVertex} vertex
-
findAllParts()
→ Set<Part>
-
Retrieve all of the Nodes and Links from the
LayoutVertexes and LayoutEdges that are in this network.
@return {Set.
-
findEdge(Link link)
→ LayoutEdge?
-
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?
-
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
-
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.
-
reverseEdge(LayoutEdge edge)
→ void
-
Reverses the direction of a LayoutEdge in the network.
@param {LayoutEdge} edge
-
splitIntoSubNetworks([bool? clean])
→ List<LayoutNetwork>
-
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.