Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

package com.codename1.ui.graph

NodeGraph: a pannable, zoomable view of a com.codename1.graph.GraphModel where nodes are dragged, connected and grouped.

It serves two kinds of picture with one component. A diagram of a system, where boxes stand for services or ideas and edges join them, is made of nodes without ports; a node editor, where data flows from outputs to inputs of a matching type, is made of nodes with GraphPorts. Both can be laid out by hand or by a com.codename1.graph.arrange.GraphArrangement.

Nodes and edges are painted, with no component behind each, so a graph of thousands of nodes costs what is on screen. A node that needs a real control gets one from a NodeComponentFactory. Colours and fonts come from the NodeGraph* UIIDs.

For a flow chart, a node takes an outline from the GraphShapeRegistry and a com.codename1.graph.GraphGroup made as a lane is a swimlane. A GraphPalette beside the graph creates nodes from templates, a PortEditorFactory edits the value of an unconnected input, and with a com.codename1.util.UndoHistory every edit can be undone.

Types

class DefaultGraphEdgeRendererPaints an edge as a line with an arrowhead on a directed edge and its label in a pill at the middle.
class DefaultGraphNodeRendererPaints a node as a rounded card: a coloured strip on the leading edge, the label, the description under it, and the ports on the sides with their labels inside the card.
class GraphAdapterA GraphListener that refuses nothing and ignores everything; override what you need.
interface GraphEdgeRendererPaints an edge along the path the graph computed for it.
interface GraphListenerWhat a NodeGraph tells an application about.
interface GraphNodeRendererPaints a node.
class GraphPaletteThe kinds of node a NodeGraph can be given, as a strip of items to drag onto it: the shapes of a flow chart, or the node types of a node editor.
interface GraphShapeThe outline of a node: what GraphNode.setShape names.
class GraphShapeRegistryThe outlines behind the names of GraphShapes, and the place to add outlines of your own.
interface NodeComponentFactoryMakes a real component for a node’s body, such as a slider in a node editor.
class NodeGraphA pannable, zoomable view of a GraphModel where nodes are dragged, connected and grouped: a system diagram, a mind map, or a node editor.
interface PortEditorFactoryMakes the small component beside an input port in which its value is typed while nothing is connected to it, as node editors do.