Package com.codename1.graph
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.
-
ClassDescriptionThe listener list, the lookups and the refusals every read-only model shares.Decides whether an edge may be made.An editable graph kept in memory.Told when the nodes, edges or groups of a
GraphModelchange.A connection from one node to another, optionally from a port to a port.A labeled box drawn around the nodes whose group id names it, such as the services of one subsystem.The nodes, edges and groups acom.codename1.ui.graph.NodeGraphshows.A box in a graph: a position and a size in world units, a label, and optionally ports and a group.A place on aGraphNodewhere edges attach, as in a node editor.