public class GraphBuilder extends Object
A `GraphBuilder` object issues commands to the canvas while building the graph. It is a wrapper around
`GraphBuilder` is used for convenience, to avoid explicitly creating command instances. It also implements custom logic for some actions. For example, in the case of adding child nodes, it translates the coordinates of a child node into the new reference system (the parent boundaries).
`GraphBuilder` builds the entire graph buildGraph(BpmnNode)
once all the conversions have took place: it traverses the entire directed graph described by the `BPMNNode`s
starting from the "root node", which represents the root of the diagram, and visiting
the parent/child relations in each BPMNNode and the `BPMNEdge` they may contain.
| Constructor and Description |
|---|
GraphBuilder(Graph<DefinitionSet,Node> graph,
DefinitionManager definitionManager,
TypedFactoryManager typedFactoryManager,
RuleManager ruleManager,
GraphCommandFactory commandFactory,
GraphCommandManager commandManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildGraph(BpmnNode rootNode)
Starting from the given root node,
it walks the graph breadth-first and issues
all the required commands to draw it on the canvas
|
void |
render(BpmnNode root)
Clears the context and then walks the graph root
to draw it on the canvas
|
public GraphBuilder(Graph<DefinitionSet,Node> graph, DefinitionManager definitionManager, TypedFactoryManager typedFactoryManager, RuleManager ruleManager, GraphCommandFactory commandFactory, GraphCommandManager commandManager)
public void render(BpmnNode root)
public void buildGraph(BpmnNode rootNode)
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.