Packageorg.un.flex.graphLayout.visual
Classpublic class FlowEdgeRenderer
ImplementsIEdgeRenderer

This is a flow edge renderer. It relys on a "flow" attribute in the edges XML data object. It uses the flow value, put in relation with some parameters of the renderer to have an initial edge thickness. At the target the edge will coverge to a point. The flow is drawn in the shape of a teardrop with the thick end near the source and relative to the amount of the flow.



Public Properties
 PropertyDefined by
  maxBaseWidth : Number
This property describes the default maximum base width of the flow.
FlowEdgeRenderer
  relativeEdgeMagnitude : Number
This property describes the relation or scale for the specified edge flow values.
FlowEdgeRenderer
Public Methods
 MethodDefined by
  
The constructor just initialises some default values.
FlowEdgeRenderer
  
draw(g:Graphics, edge:IEdge, displayLabel:Boolean = false):void
The draw function, i.e.
FlowEdgeRenderer
Property detail
maxBaseWidthproperty
public var maxBaseWidth:Number

This property describes the default maximum base width of the flow. It should be oriented on the size of the node labels.

The default value is 100.

relativeEdgeMagnitudeproperty 
public var relativeEdgeMagnitude:Number

This property describes the relation or scale for the specified edge flow values. It is assumed to be a maximum and the drawing thickness will be oriented on that value. This does not mean that not larger values can be specified, but they may look ugly.

The default value is 1000.

Constructor detail
FlowEdgeRenderer()constructor
public function FlowEdgeRenderer()

The constructor just initialises some default values.

Method detail
draw()method
public function draw(g:Graphics, edge:IEdge, displayLabel:Boolean = false):void

The draw function, i.e. the main function to be used. Draws a straight line from one node of the edge to the other. The colour is determined by a set of edge parameters, which are stored in an edge object. Draws an edge. The way how the colouring is currently handled, with the distinguished parameter is not appropriate, this may need to change to something more flexible.

Parameters
g:Graphics — Reference to the Graphics object of the Drawing surface.
 
edge:IEdge — The edge to draw, it needs to provide all the information required, i.e. locations.
 
displayLabel:Boolean (default = false) — If set, it displays a label in the middle of the egde, provided the edge has an edge renderer (UIComponent) associated with it.