Packageflare.vis.data
Classpublic class EdgeSprite
InheritanceEdgeSprite Inheritance DataSprite Inheritance DirtySprite Inheritance flash.display.Sprite

Visually represents a connection between two data elements. Examples include an edge in a graph structure or a line between points in a line chart. EdgeSprites maintain source and target properties for accessing the NodeSprites connected by this edge. By default, EdgeSprites are drawn using an EdgeRenderer. EdgeSprites are typically managed by a Data object.



Public Properties
 PropertyDefined by
 Inheritedangle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
  arrowHeight : Number = -1
The height of the arrow head.
EdgeSprite
  arrowType : String = "none"
The type of arrow to be used on the edge.
EdgeSprite
  arrowWidth : Number = -1
The width of the arrow head.
EdgeSprite
 Inheriteddata : Object
Object storing backing data values.
DataSprite
  directed : Boolean = false
Flag indicating if this edge is directed (true) or undirected (false).
EdgeSprite
 InheritedfillAlpha : Number
The alpha channel (a value between 0 and 1) for the fill color.
DataSprite
 InheritedfillColor : uint
The fill color for this data sprite.
DataSprite
 InheritedfillHue : Number
The hue component of the fill color in HSV color space.
DataSprite
 InheritedfillSaturation : Number
The saturation component of the fill color in HSV color space.
DataSprite
 InheritedfillValue : Number
The value (brightness) component of the fill color in HSV color space.
DataSprite
 Inheritedfixed : Boolean
Fixed flag to prevent this sprite from being re-positioned.
DataSprite
 Inheritedh : Number
Auxiliary property often used as a height parameter.
DataSprite
 Inheritedheight : Number
If dirty, this sprite is re-rendered before returning the height.
DirtySprite
 InheritedlineAlpha : Number
The alpha channel (a value between 0 and 1) for the line color.
DataSprite
 InheritedlineColor : uint
The line color for this data sprite.
DataSprite
 InheritedlineHue : Number
The hue component of the line color in HSV color space.
DataSprite
 InheritedlineSaturation : Number
The saturation component of the line color in HSV color space.
DataSprite
 InheritedlineValue : Number
The value (brightness) component of the line color in HSV color space.
DataSprite
 InheritedlineWidth : Number
The line width for this data sprite.
DataSprite
 Inheritedorigin : Point
The origin point for polar coordinates.
DirtySprite
 Inheritedpoints : Array
Optional array of x,y values for specifying arbitrary shapes.
DataSprite
 Inheritedprops : Object
Object for attaching additional properties to this sprite.
DataSprite
 Inheritedradius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
 Inheritedrenderer : IRenderer
The renderer for drawing this DataSprite.
DataSprite
 Inheritedshape : String
Name of the shape value of this data sprite.
DataSprite
 Inheritedsize : Number
The size value of this data sprite (1 by default).
DataSprite
  source : NodeSprite
The first, or source, node upon which this edge is incident.
EdgeSprite
  target : NodeSprite
The second, or target, node upon which this edge is incident.
EdgeSprite
 Inheritedu : Number
Auxiliary property often used as a shape parameter.
DataSprite
 Inheritedv : Number
Auxiliary property often used as a shape parameter.
DataSprite
 Inheritedw : Number
Auxiliary property often used as a width parameter.
DataSprite
 Inheritedwidth : Number
If dirty, this sprite is re-rendered before returning the width.
DirtySprite
 Inheritedx : Number
DirtySprite
  x1 : Number
The x-coordinate for the first end point of this edge.
EdgeSprite
  x2 : Number
The x-coordinate for the second end point of this edge.
EdgeSprite
 Inheritedy : Number
DirtySprite
  y1 : Number
The y-coordinate for the first end point of this edge.
EdgeSprite
  y2 : Number
The y-coordinate for the second end point of this edge.
EdgeSprite
Protected Properties
 PropertyDefined by
 Inherited_angle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
 Inherited_data : Object
Object storing backing data values.
DataSprite
 Inherited_fillColor : uint = 0xffcccccc
The fill color for this data sprite.
DataSprite
 Inherited_fixed : int = 0
Fixed flag to prevent this sprite from being re-positioned.
DataSprite
 Inherited_h : Number = 0
Auxiliary property often used as a height parameter.
DataSprite
 Inherited_lineColor : uint = 0xff000000
The line color for this data sprite.
DataSprite
 Inherited_lineWidth : Number = 0
The line width for this data sprite.
DataSprite
 Inherited_origin : Point
The origin point for polar coordinates.
DirtySprite
 Inherited_points : Array
Optional array of x,y values for specifying arbitrary shapes.
DataSprite
 Inherited_prop : Object
Object for attaching additional properties to this sprite.
DataSprite
 Inherited_radius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
 Inherited_renderer : IRenderer
The renderer for drawing this DataSprite.
DataSprite
 Inherited_shape : String = "circle"
Code indicating the shape value of this data sprite.
DataSprite
 Inherited_size : Number = 1
The size value of this data sprite (1 by default).
DataSprite
 Inherited_u : Number = 0
Auxiliary property often used as a shape parameter.
DataSprite
 Inherited_v : Number = 0
Auxiliary property often used as a shape parameter.
DataSprite
 Inherited_w : Number = 0
Auxiliary property often used as a width parameter.
DataSprite
Public Methods
 MethodDefined by
  
EdgeSprite(source:NodeSprite = null, target:NodeSprite = null, directed:Boolean = false)
Creates a new EdgeSprite.
EdgeSprite
  
clear():void
Clears the edge, removing references to the edge's nodes.
EdgeSprite
 Inherited
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
DirtySprite
 Inherited
fix(num:uint = 1):void
Increments the fixed counter.
DataSprite
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
DirtySprite
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
DirtySprite
 Inherited
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
DirtySprite
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
DirtySprite
  
Given a node upon which this edge is incident, return the other node connected by this edge.
EdgeSprite
  
render():void
Draw this sprite's graphical content.
EdgeSprite
 Inherited
renderDirty(evt:Event = null):void
[static] Frame render callback that renders all sprites on the dirty list.
DirtySprite
 Inherited
toString():String
DirtySprite
 Inherited
unfix(num:uint = 1):void
Decrements the fixed counter.
DataSprite
Public Constants
 ConstantDefined by
 InheritedZERO : Point
[static] A constant for the point (0,0).
DirtySprite
Property detail
arrowHeightproperty
public var arrowHeight:Number = -1

The height of the arrow head. The default is -1, in which case the height is automatically determined based on the arrow width or the line width.

arrowTypeproperty 
public var arrowType:String = "none"

The type of arrow to be used on the edge. Default is Arrows.NONE

arrowWidthproperty 
public var arrowWidth:Number = -1

The width of the arrow head. The default is -1, in which case the width is automatically determined based on the arrow height or the line width.

directedproperty 
public var directed:Boolean = false

Flag indicating if this edge is directed (true) or undirected (false).

sourceproperty 
public var source:NodeSprite

The first, or source, node upon which this edge is incident.

targetproperty 
public var target:NodeSprite

The second, or target, node upon which this edge is incident.

x1property 
public var x1:Number

The x-coordinate for the first end point of this edge.

x2property 
public var x2:Number

The x-coordinate for the second end point of this edge.

y1property 
public var y1:Number

The y-coordinate for the first end point of this edge.

y2property 
public var y2:Number

The y-coordinate for the second end point of this edge.

Constructor detail
EdgeSprite()constructor
public function EdgeSprite(source:NodeSprite = null, target:NodeSprite = null, directed:Boolean = false)

Creates a new EdgeSprite.

Parameters
source:NodeSprite (default = null) — the source node
 
target:NodeSprite (default = null) — the target node
 
directed:Boolean (default = false) — true for a directed edge, false for undirected
Method detail
clear()method
public function clear():void

Clears the edge, removing references to the edge's nodes.

other()method 
public function other(n:NodeSprite):NodeSprite

Given a node upon which this edge is incident, return the other node connected by this edge.

Parameters
n:NodeSprite — a node upon which this edge is incident

Returns
NodeSprite — the other node
render()method 
public override function render():void

Draw this sprite's graphical content. Subclasses should override this method with custom drawing code.