| Package | com.asterisq.constellation.renderers |
| Class | public class BasicNodeRenderer |
| Inheritance | BasicNodeRenderer NodeRenderer mx.core.UIComponent |
| Implements | IDraggableNodeRenderer, ISelectableNodeRenderer, ITweenableNodeRenderer |
| Subclasses | DefaultNodeRenderer |
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 node renderer responds to user interaction, override the event handler methods.
| Property | Defined by | ||
|---|---|---|---|
![]() | acceleration : Point
The acceleration of this node renderer.
| NodeRenderer | |
| animationDuration : Number [read-only]
The total length of the animation, in milliseconds.
| BasicNodeRenderer | ||
| animationInitialPosition : Point
The position of the node renderer when the animation begins.
| BasicNodeRenderer | ||
| animationStartTime : Number
The timestamp marking the beginning of the animation, in milliseconds.
| BasicNodeRenderer | ||
| animationTargetPosition : Point
The position of the node renderer when the animation is finished.
| BasicNodeRenderer | ||
![]() | constellation : IConstellation
The constellation instance displaying this node renderer.
| NodeRenderer | |
| dragCenter : Point
Indicates the position of the "grip point" of the mouse during dragging.
| BasicNodeRenderer | ||
![]() | edgeRenderers : Array
A list of edge renderers connecting this node renderer.
| NodeRenderer | |
| isDragging : Boolean
Indicates whether this node renderer is currently being dragged.
| BasicNodeRenderer | ||
![]() | neighborNodeRenderers : Array
A list of neighbor renderers.
| NodeRenderer | |
![]() | node : LinkedNode
The node being rendered.
| NodeRenderer | |
![]() | numEdgeRenderers : uint
The number of edge renderers connecting this node renderer.
| NodeRenderer | |
![]() | position : Point
The position of this node renderer.
| NodeRenderer | |
| selected : Boolean
Indicates whether this node renderer is selected.
| BasicNodeRenderer | ||
![]() | velocity : Point
The velocity of this node renderer.
| NodeRenderer | |
| Property | Defined by | ||
|---|---|---|---|
| hitArea_sp : Sprite
The mouse hit area.
| BasicNodeRenderer | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new node renderer.
| BasicNodeRenderer | ||
![]() |
validatePosition():void
Validates this node renderer's position.
| NodeRenderer | |
| Method | Defined by | ||
|---|---|---|---|
|
clickHandler(evt:MouseEvent):void
Called when a click event is received from the hit area.
| BasicNodeRenderer | ||
![]() |
dataChangeHandler(evt:GraphItemEvent = null):void
Called when the node's data changes.
| NodeRenderer | |
|
doubleClickHandler(evt:MouseEvent):void
Called when a double click event is received from the hit area.
| BasicNodeRenderer | ||
|
mouseDownHandler(evt:MouseEvent):void
Called when a mouse down event is received from the hit area.
| BasicNodeRenderer | ||
|
mouseOutHandler(evt:MouseEvent):void
Called when a mouse out event is received from the hit area.
| BasicNodeRenderer | ||
|
mouseOverHandler(evt:MouseEvent):void
Called when a mouse over event is received from the hit area.
| BasicNodeRenderer | ||
|
mouseUpHandler(evt:MouseEvent):void
Called when a mouse up event is received from the hit area.
| BasicNodeRenderer | ||
|
stageMouseUpHandler(evt:MouseEvent):void
Called when a mouse up event is received from the stage object.
| BasicNodeRenderer | ||
| animationDuration | property |
animationDuration:Number [read-only]The total length of the animation, in milliseconds.
Implementation public function get animationDuration():Number
| animationInitialPosition | property |
animationInitialPosition:Point [read-write]The position of the node renderer when the animation begins.
Implementation public function get animationInitialPosition():Point
public function set animationInitialPosition(value:Point):void
| animationStartTime | property |
animationStartTime:Number [read-write]The timestamp marking the beginning of the animation, in milliseconds.
Implementation public function get animationStartTime():Number
public function set animationStartTime(value:Number):void
| animationTargetPosition | property |
animationTargetPosition:Point [read-write]The position of the node renderer when the animation is finished.
Implementation public function get animationTargetPosition():Point
public function set animationTargetPosition(value:Point):void
| dragCenter | property |
dragCenter:Point [read-write]Indicates the position of the "grip point" of the mouse during dragging. This value is relative to this node renderer instance.
Implementation public function get dragCenter():Point
public function set dragCenter(value:Point):void
| hitArea_sp | property |
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.
| isDragging | property |
isDragging:Boolean [read-write]Indicates whether this node renderer is currently being dragged.
Implementation public function get isDragging():Boolean
public function set isDragging(value:Boolean):void
| selected | property |
selected:Boolean [read-write]Indicates whether this node renderer is selected.
Implementation public function get selected():Boolean
public function set selected(value:Boolean):void
| BasicNodeRenderer | () | constructor |
public function BasicNodeRenderer()Creates a new node renderer.
| clickHandler | () | method |
protected function clickHandler(evt:MouseEvent):voidCalled when a click event is received from the hit area. The event is redispatched if the mouse was held down for less than 300 milliseconds and the node position changed less than 5px.
Parametersevt:MouseEvent |
| doubleClickHandler | () | method |
protected function doubleClickHandler(evt:MouseEvent):voidCalled when a double click event is received from the hit area. The event is redispatched.
Parametersevt:MouseEvent |
| mouseDownHandler | () | method |
protected function mouseDownHandler(evt:MouseEvent):voidCalled when a mouse down event is received from the hit area. Dragging starts and the event is redispatched.
Parametersevt:MouseEvent |
| mouseOutHandler | () | method |
protected function mouseOutHandler(evt:MouseEvent):voidCalled when a mouse out event is received from the hit area. The event is redispatched if the node is not being dragged.
Parametersevt:MouseEvent |
| mouseOverHandler | () | method |
protected function mouseOverHandler(evt:MouseEvent):voidCalled when a mouse over event is received from the hit area. The event is redispatched if the node is not being dragged.
Parametersevt:MouseEvent |
| mouseUpHandler | () | method |
protected function mouseUpHandler(evt:MouseEvent):voidCalled when a mouse up event is received from the hit area. The event is redispatched.
Parametersevt:MouseEvent |
| stageMouseUpHandler | () | method |
protected function stageMouseUpHandler(evt:MouseEvent):voidCalled when a mouse up event is received from the stage object. Dragging stops.
Parametersevt:MouseEvent |