Interface GraphNodeRenderer
- All Known Implementing Classes:
DefaultGraphNodeRenderer
public interface GraphNodeRenderer
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.
-
Method Summary
-
Method Details
-
paintNode
void paintNode(Graphics g, NodeGraph graph, GraphNode node, int x, int y, int w, int h, boolean selected) Paints
nodeinto the rectangle.Parameters
g: the graphics, with the colour and alpha the renderer may changegraph: the component, for its zoom and its port geometrynode: the nodex,y,w,h: the node on screenselected: true when the node is in the selection
-