Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface GraphNodeRenderer
Known subtypesDefaultGraphNodeRenderer
Paints a node. DefaultGraphNodeRenderer paints a card with a title, a
description and the ports; implement this, or extend that, for nodes of
your own design.
A renderer draws in screen pixels; the rectangle is the node’s world
rectangle at the current zoom. Below NodeGraph.getDetailZoom a renderer
should draw no text, which would be unreadable and costs most of a frame
in a large graph.
Methods
public abstract void paintNode(Graphics g, NodeGraph graph, GraphNode node, int x, int y, int w, int h, boolean selected) | Paints node into the rectangle. |
Method details
paintNode
public abstract void paintNode(Graphics g, NodeGraph graph, GraphNode node, int x, int y, int w, int h, boolean selected)Paints
node into the rectangle.Parameters
gGraphics- the graphics, with the colour and alpha the renderer may change
graphNodeGraph- the component, for its zoom and its port geometry
nodeGraphNode- the node
xint- ,
y,w,h: the node on screen yint- Not documented.
wint- Not documented.
hint- Not documented.
selectedboolean- true when the node is in the selection