Force-directed layout treats the graph as if it were a system of physical bodies with forces acting on them and between them. The algorithm seeks a configuration of the bodies with locally minimal energy, i.e. vertex positions such that the sum of the forces on each vertex is zero.
Constructs a ForceDirectedLayout with no Layout#network and with no owning Layout#diagram.
Gets or sets the top-left point for where the graph should be positioned when laid out.
Gets or sets the space between which the layout will position the connected graphs that together compose the network.
Gets or sets whether #commitNodes should move all of the nodes so that the nodes all fit with the top-left corner at the Layout#arrangementOrigin.
Gets or sets whether this layout should find all Nodes whose category is "Comment" and whose anchors are nodes represented in the network, and add ForceDirectedVertexes representing those balloon comments as nodes in the network.
Gets the current iteration count, valid during a call to #doLayout.
Gets or sets the default value computed by #electricalCharge.
Gets or sets the default value computed by #springLength.
Gets or sets the default value computed by #electricalCharge.
Gets or sets the default value computed by #gravitationalMass.
Gets or sets the default value computed by #springLength.
Gets or sets the default value computed by #springStiffness.
Gets the Diagram that owns this layout, if it is the value of Diagram#layout.
Gets or sets approximately how far a node must move in order for the iterations to continue.
Gets the Group that uses this layout, if it is the value of a group's Group#layout.
Gets or sets a threshold for the distance beyond which the electrical charge forces may be ignored.
Gets or sets whether this layout is performed on an initial layout.
Gets or sets whether this layout can be invalidated by #invalidateLayout.
Gets or sets whether this layout be performed in real-time, before the end of a transaction.
Gets or sets whether this layout routes Links.
Gets or sets whether this layout needs to be performed again.
Gets or sets whether this layout depends on the Diagram#viewportBounds's size.
Gets or sets the maximum number of iterations to perform when doing the force-directed auto layout.
Gets or sets the LayoutNetwork used by this Layout, if any.
Gets or sets whether the fromSpot and the toSpot of every Link should be set to Spot#Default.
Position the Nodes according to the Vertex positions.
any
Commit the position and routing of all edge links.
any
Commit the position of all vertex nodes.
any
Creates a copy of this Layout and returns it.
Create a new LayoutNetwork of ForceDirectedVertexes and ForceDirectedEdges.
Assign the positions of the vertexes in the network.
A Diagram or a Group or a collection of Parts.
any
any
any
Returns the charge of the vertex, the value of ForceDirectedVertex#charge if it's a number, or else the value of #defaultElectricalCharge.
number
Returns the electrical field in the X direction acting on a vertex at the given point.
Used to define an external electrical field at a point independent of the vertex charges. A vertex L is acted upon by a force in the X direction of magnitude
number
Returns the electrical field in the Y direction acting on a vertex at the given point.
Used to define an external electrical field at a point independent of the vertex charges. A vertex L is acted upon by a force in the Y direction of magnitude
number
This returns the gravitational field in the X direction acting on a vertex at the given point.
Used to define an external gravitational field at a point independent of the vertex masses. A vertex L is acted upon by a force in the X direction of magnitude
number
This returns the gravitational field in the Y direction acting on a vertex at the given point.
Used to define an external gravitational field at a point independent of the vertex masses. A vertex L is acted upon by a force in the Y direction of magnitude
number
Returns the mass of the vertex, the value of ForceDirectedVertex#mass if it's a number, or else the value of #defaultGravitationalMass.
number
If #isOngoing is true and if an initial layout has not yet been performed, set the #isValidLayout property to false, and ask to perform another layout in the near future.
any
This predicate returns true if the vertex should not be moved by the layout algorithm but still have an effect on nearby and connected vertexes. The default implementation returns ForceDirectedVertex#isFixed.
boolean
Create and initialize a LayoutNetwork with the given nodes and links.
A Diagram or a Group or a collection of Parts.
Returns the length of the spring representing an edge. The two vertexes connected by the edge E are acted upon by a force of magnitude
number
Returns the stiffness of the spring representing an edge. The two vertexes connected by the edge E are acted upon by a force of magnitude
number
When using a LayoutNetwork, update the "physical" node positionings and link routings.
any