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.

  • LayeredArrangement for flows and pipelines: edges point one way, layer to layer, with few crossings.
  • ForceArrangement for networks: an organic picture that can also run live, a step a frame, while the user drags.
  • TreeArrangement for hierarchies, and RadialArrangement for 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 ArrangementResultWhere an arrangement wants every node, and the bends it wants in the edges.
class ForceArrangementAn organic arrangement for networks: edges pull like springs and every node pushes every other away, until the graph settles.
interface GraphArrangementPlaces the nodes of a graph.
class LayeredArrangementAn arrangement for flows: every edge points the same way, from one layer to the next, with as few crossings as it can find.
class RadialArrangementA 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 TreeArrangementAn 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.