Packagecom.asterisq.constellation.renderers
Classpublic class BasicEdgeRenderer
InheritanceBasicEdgeRenderer Inheritance EdgeRenderer Inheritance mx.core.UIComponent
SubclassesDefaultEdgeRenderer

A basic edge renderer. Has no display but implements a hit area and UI event handling.

The hit area is added automatically in createChildren(). Subclasses need to ensure that DisplayObjects at higher depths don't block mouse events from reaching the hit area. To do this, use the following code:

setChildIndex(hitArea_sp, numChildren-1);

To change the way the edge renderer responds to user interaction, override the event handler methods.



Public Properties
 PropertyDefined by
 Inheritedconstellation : IConstellation
The constellation instance displaying this edge renderer.
EdgeRenderer
 Inheritededge : LinkedEdge
The edge being rendered.
EdgeRenderer
 InheritedheadNodeRenderer : INodeRenderer
The node renderer representing the tail node in this edge renderer.
EdgeRenderer
 InheritednodeRenderers : Array
An ordered list of node renderers in this edge renderer.
EdgeRenderer
 InheritedtailNodeRenderer : INodeRenderer
The node renderer representing the head node in this edge renderer.
EdgeRenderer
Protected Properties
 PropertyDefined by
  hitArea_sp : Sprite
The mouse hit area.
BasicEdgeRenderer
Public Methods
 MethodDefined by
  
Creates a new edge renderer.
BasicEdgeRenderer
 Inherited
Fetches the other node renderer in this edge renderer, given one of them.
EdgeRenderer
 Inherited
Validates this edge renderer's tail and head node renderer positions.
EdgeRenderer
Protected Methods
 MethodDefined by
  
clickHandler(evt:MouseEvent):void
Called when a click event is received from the hit area.
BasicEdgeRenderer
  
BasicEdgeRenderer
 Inherited
Called when the edge's data changes.
EdgeRenderer
  
doubleClickHandler(evt:MouseEvent):void
Called when a double click event is received from the hit area.
BasicEdgeRenderer
  
mouseDownHandler(evt:MouseEvent):void
Called when a mouse down event is received from the hit area.
BasicEdgeRenderer
  
mouseOutHandler(evt:MouseEvent):void
Called when a mouse out event is received from the hit area.
BasicEdgeRenderer
  
mouseOverHandler(evt:MouseEvent):void
Called when a mouse over event is received from the hit area.
BasicEdgeRenderer
  
mouseUpHandler(evt:MouseEvent):void
Called when a mouse up event is received from the hit area.
BasicEdgeRenderer
  
redispatchMouseEvent(evt:MouseEvent):void
Redispatches the given event as though it had come from this node renderer.
BasicEdgeRenderer
  
stageMouseUpHandler(evt:MouseEvent):void
Called when a mouse up event is received from the stage object.
BasicEdgeRenderer
Property detail
hitArea_spproperty
protected var hitArea_sp:Sprite

The mouse hit area. Override the updateDisplayList() and use the hit area's graphics property to set the shape of the hit area.

Constructor detail
BasicEdgeRenderer()constructor
public function BasicEdgeRenderer()

Creates a new edge renderer.

Method detail
clickHandler()method
protected function clickHandler(evt:MouseEvent):void

Called when a click event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
createChildren()method 
protected override function createChildren():void

doubleClickHandler()method 
protected function doubleClickHandler(evt:MouseEvent):void

Called when a double click event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
mouseDownHandler()method 
protected function mouseDownHandler(evt:MouseEvent):void

Called when a mouse down event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
mouseOutHandler()method 
protected function mouseOutHandler(evt:MouseEvent):void

Called when a mouse out event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
mouseOverHandler()method 
protected function mouseOverHandler(evt:MouseEvent):void

Called when a mouse over event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
mouseUpHandler()method 
protected function mouseUpHandler(evt:MouseEvent):void

Called when a mouse up event is received from the hit area. The event is redispatched.

Parameters
evt:MouseEvent
redispatchMouseEvent()method 
protected function redispatchMouseEvent(evt:MouseEvent):void

Redispatches the given event as though it had come from this node renderer. Make sure to call evt.stopImmediatePropagation() first.

Parameters
evt:MouseEvent
stageMouseUpHandler()method 
protected function stageMouseUpHandler(evt:MouseEvent):void

Called when a mouse up event is received from the stage object.

Parameters
evt:MouseEvent