Class DefaultGraphEdgeRenderer
java.lang.Object
com.codename1.ui.graph.DefaultGraphEdgeRenderer
- All Implemented Interfaces:
GraphEdgeRenderer
Paints an edge as a line with an arrowhead on a directed edge and its label in a pill at the middle.
Colours come from NodeGraphEdge (the line) and NodeGraphEdgeLabel
(the pill and its text); a selected edge takes the colour of
NodeGraphNodeSelected. An edge's style key picks a colour from
setColor.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultGraphEdgeRenderer
public DefaultGraphEdgeRenderer()
-
-
Method Details
-
setColor
Maps an edge style key to a line colour. -
paintEdge
public void paintEdge(Graphics g, NodeGraph graph, GraphEdge edge, double[] xs, double[] ys, int count, boolean selected) Description copied from interface:GraphEdgeRendererPaints
edgethrough the points.Parameters
g: the graphicsgraph: the componentedge: the edgexs,ys: the path on screen, from the source to the target; curves are already flattened into pointscount: how many points of the arrays are usedselected: true when the edge is selected
- Specified by:
paintEdgein interfaceGraphEdgeRenderer
-