Package com.codename1.ui.graph
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.
-
ClassDescriptionPaints an edge as a line with an arrowhead on a directed edge and its label in a pill at the middle.Paints 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.A
GraphListenerthat refuses nothing and ignores everything; override what you need.Paints an edge along the path the graph computed for it.What aNodeGraphtells an application about.Paints a node.Makes a real component for a node's body, such as a slider in a node editor.A pannable, zoomable view of aGraphModelwhere nodes are dragged, connected and grouped: a system diagram, a mind map, or a node editor.