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

This is a variant of the 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. The whole flow is also bent in a bit of a curve.



Public Properties
 PropertyDefined by
  bendingDegree : int = 100
This property describes the deviation of the bending point.
FlowCurveEdgeRenderer
  bendingDirection : int = 0
This property describes whether all the deviations should turn left or right.
FlowCurveEdgeRenderer
  maxBaseWidth : Number
This property describes the default maximum base width of the flow.
FlowCurveEdgeRenderer
  relativeEdgeMagnitude : Number
This property describes the relation or scale for the specified edge flow values.
FlowCurveEdgeRenderer
Public Methods
 MethodDefined by
  
The constructor just initialises some default values.
FlowCurveEdgeRenderer
  
draw(g:Graphics, edge:IEdge, displayLabel:Boolean = false):void
The draw function, i.e.
FlowCurveEdgeRenderer
Public Constants
 ConstantDefined by
  BEND_LEFT : int = 0
[static] constant to describe that the bending should be left.
FlowCurveEdgeRenderer
  BEND_RIGHT : int = 1
[static] constant to describe that the bending should be right.
FlowCurveEdgeRenderer
Property detail
bendingDegreeproperty
public var bendingDegree:int = 100

This property describes the deviation of the bending point. Right now this is fixed in pixel. Keeping the deviation fixed will lead to more pronounced bending in short edges and are less pronounced one in longer edges. Ideally this should be relative to the screen size.

bendingDirectionproperty 
public var bendingDirection:int = 0

This property describes whether all the deviations should turn left or right.

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
FlowCurveEdgeRenderer()constructor
public function FlowCurveEdgeRenderer()

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.
Constant detail
BEND_LEFTconstant
public static const BEND_LEFT:int = 0

constant to describe that the bending should be left.

BEND_RIGHTconstant 
public static const BEND_RIGHT:int = 1

constant to describe that the bending should be right.