Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
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.
Types
class ArrangementResult | Where an arrangement wants every node, and the bends it wants in the edges. |
class ForceArrangement | An organic arrangement for networks: edges pull like springs and every node pushes every other away, until the graph settles. |
interface GraphArrangement | Places the nodes of a graph. |
class LayeredArrangement | An arrangement for flows: every edge points the same way, from one layer to the next, with as few crossings as it can find. |
class RadialArrangement | 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. |
class TreeArrangement | 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. |