Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
package com.codename1.graph
Graphs as data: nodes, the edges between them, the groups they belong to,
and the arrangements that place them. What a
com.codename1.ui.graph.NodeGraph shows.
Nothing here draws, and everything runs without a component, on a server too.
GraphModelis the graph.DefaultGraphModelkeeps one in memory and accepts edits, each checked by aConnectionValidator.- A
GraphNodeis a box in world units. Give itGraphPorts for a node editor, where edges join an output to an input of the same type; leave it without for a diagram, where edges join nodes. - A
GraphGroupis a box drawn around its members, and can collapse. com.codename1.graph.arrangeplaces the nodes automatically.
The classes are not thread safe: use a model from one thread, which for a model shown by a component is the EDT.
Types
class AbstractGraphModel | The listener list, the lookups and the refusals every read-only model shares. |
class ConnectionValidator | Decides whether an edge may be made. |
class DefaultGraphModel | An editable graph kept in memory. |
interface GraphChangeListener | Told when the nodes, edges or groups of a GraphModel change. |
class GraphEdge | A connection from one node to another, optionally from a port to a port. |
class GraphGroup | A labeled box drawn around the nodes whose group id names it, such as the services of one subsystem. |
interface GraphModel | The nodes, edges and groups a com.codename1.ui.graph.NodeGraph shows. |
class GraphNode | A box in a graph: a position and a size in world units, a label, and optionally ports and a group. |
class GraphPort | A place on a GraphNode where edges attach, as in a node editor. |