Package com.codename1.graph.arrange
package com.codename1.graph.arrange
Automatic placement of the nodes of a com.codename1.graph.GraphModel.
LayeredArrangementfor flows and pipelines: edges point one way, layer to layer, with few crossings.ForceArrangementfor networks: an organic picture that can also run live, a step a frame, while the user drags.TreeArrangementfor hierarchies, andRadialArrangementfor a tree on rings.
An arrangement returns an ArrangementResult and leaves the model alone;
ArrangementResult.apply moves the nodes. A graph laid out by hand needs no
arrangement at all.
-
ClassDescriptionWhere an arrangement wants every node, and the bends it wants in the edges.An organic arrangement for networks: edges pull like springs and every node pushes every other away, until the graph settles.Places the nodes of a graph.An arrangement for flows: every edge points the same way, from one layer to the next, with as few crossings as it can find.A tree on rings: the root at the centre and each level on a circle around it, every subtree in a wedge as wide as its share of the leaves.An arrangement for hierarchies, such as an org chart or a file tree: every node below its parent, parents centred over their children, and no subtree overlapping another.