| Package | flare.vis.data |
| Class | public class NodeSprite |
| Inheritance | NodeSprite DataSprite DirtySprite flash.display.Sprite |
Data object.
NodeSprites can separately maintain adjacency lists for both a general graph structure (managing lists for inlinks and outlinks) and a tree structure (managing a list for child links and a parent pointer). The graph and tree lists are maintained completely separately to maximize flexibility. While the the tree lists are often used to record a spanning tree of the general network structure, they can also be used to represent a hierarchy completely distinct from a co-existing graph structure. Take this into account when iterating over the edges incident on this node.
| Property | Defined by | ||
|---|---|---|---|
| angle : Number [write-only]
| NodeSprite | ||
| childDegree : uint [read-only] The number of child links.
| NodeSprite | ||
![]() | data : Object Object storing backing data values.
| DataSprite | |
| degree : uint [read-only] The number of inlinks and outlinks.
| NodeSprite | ||
| depth : uint [read-only] The depth of this node in the tree structure.
| NodeSprite | ||
| expanded : Boolean Flag indicating if this node is currently expanded.
| NodeSprite | ||
![]() | fillAlpha : Number The alpha channel (a value between 0 and 1) for the fill color.
| DataSprite | |
![]() | fillColor : uint The fill color for this data sprite.
| DataSprite | |
![]() | fillHue : Number The hue component of the fill color in HSV color space.
| DataSprite | |
![]() | fillSaturation : Number The saturation component of the fill color in HSV color space.
| DataSprite | |
![]() | fillValue : Number The value (brightness) component of the fill color in HSV color space.
| DataSprite | |
| firstChildNode : NodeSprite
[read-only] The first child of this node in the tree structure.
| NodeSprite | ||
![]() | fixed : Boolean Fixed flag to prevent this sprite from being re-positioned.
| DataSprite | |
![]() | h : Number Auxiliary property often used as a height parameter.
| DataSprite | |
![]() | height : Number
If dirty, this sprite is re-rendered before returning the height.
| DirtySprite | |
| inDegree : uint [read-only] The number of inlinks.
| NodeSprite | ||
| lastChildNode : NodeSprite
[read-only] The last child of this node in the tree structure.
| NodeSprite | ||
![]() | lineAlpha : Number The alpha channel (a value between 0 and 1) for the line color.
| DataSprite | |
![]() | lineColor : uint The line color for this data sprite.
| DataSprite | |
![]() | lineHue : Number The hue component of the line color in HSV color space.
| DataSprite | |
![]() | lineSaturation : Number The saturation component of the line color in HSV color space.
| DataSprite | |
![]() | lineValue : Number The value (brightness) component of the line color in HSV color space.
| DataSprite | |
![]() | lineWidth : Number The line width for this data sprite.
| DataSprite | |
| nextNode : NodeSprite
[read-only] The next sibling of this node in the tree structure.
| NodeSprite | ||
![]() | origin : Point The origin point for polar coordinates.
| DirtySprite | |
| outDegree : uint [read-only] The number of outlinks.
| NodeSprite | ||
| parentEdge : EdgeSprite
The edge connecting this node to its parent in a tree structure.
| NodeSprite | ||
| parentIndex : int The index of this node in its tree parent's child links list.
| NodeSprite | ||
| parentNode : NodeSprite
[read-only] The parent of this node in the tree structure.
| NodeSprite | ||
![]() | points : Array Optional array of x,y values for specifying arbitrary shapes.
| DataSprite | |
| prevNode : NodeSprite
[read-only] The previous sibling of this node in the tree structure.
| NodeSprite | ||
![]() | props : Object Object for attaching additional properties to this sprite.
| DataSprite | |
| radius : Number [write-only]
| NodeSprite | ||
![]() | renderer : IRenderer
The renderer for drawing this DataSprite.
| DataSprite | |
![]() | shape : String Name of the shape value of this data sprite.
| DataSprite | |
![]() | size : Number The size value of this data sprite (1 by default).
| DataSprite | |
![]() | u : Number Auxiliary property often used as a shape parameter.
| DataSprite | |
![]() | v : Number Auxiliary property often used as a shape parameter.
| DataSprite | |
![]() | w : Number Auxiliary property often used as a width parameter.
| DataSprite | |
![]() | width : Number
If dirty, this sprite is re-rendered before returning the width.
| DirtySprite | |
| x : Number [write-only]
| NodeSprite | ||
| y : Number [write-only]
| NodeSprite | ||
| Method | Defined by | ||
|---|---|---|---|
|
addChildEdge(e:EdgeSprite):uint
Adds a child edge to this node.
| NodeSprite | ||
|
addInEdge(e:EdgeSprite):uint
Adds an inlink edge to this node.
| NodeSprite | ||
|
addOutEdge(e:EdgeSprite):uint
Adds an outlink edge to this node.
| NodeSprite | ||
![]() |
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
| DirtySprite | |
![]() |
fix(num:uint = 1):void
Increments the fixed counter.
| DataSprite | |
![]() |
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
| DirtySprite | |
|
getChildEdge(i:uint):EdgeSprite
Gets the child edge at the specified position
| NodeSprite | ||
|
getChildNode(i:uint):NodeSprite
Gets the child node at the specified position
| NodeSprite | ||
|
getInEdge(i:uint):EdgeSprite
Gets the inlink edge at the specified position
| NodeSprite | ||
|
getInNode(i:uint):NodeSprite
Gets the inlink node at the specified position
| NodeSprite | ||
|
getOutEdge(i:uint):EdgeSprite
Gets the outlink edge at the specified position
| NodeSprite | ||
|
getOutNode(i:uint):NodeSprite
Gets the outlink node at the specified position
| NodeSprite | ||
![]() |
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
| DirtySprite | |
![]() |
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
| DirtySprite | |
![]() |
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
| DirtySprite | |
|
isConnected(n:NodeSprite, opt:uint):Boolean
Indicates if the input node is connected to this node by an edge.
| NodeSprite | ||
|
removeAllEdges():void
Removes all edges incident on this node.
| NodeSprite | ||
|
removeChildEdge(e:EdgeSprite):void
Removes an edge from the child links list.
| NodeSprite | ||
|
removeEdges(type:int):void
Removes all edges of the indicated edge type.
| NodeSprite | ||
|
removeInEdge(e:EdgeSprite):void
Removes an edge from the inlinks list.
| NodeSprite | ||
|
removeOutEdge(e:EdgeSprite):void
Removes an edge from the outlinks list.
| NodeSprite | ||
![]() |
render():void
Draw this sprite's graphical content.
| DataSprite | |
![]() |
renderDirty(evt:Event = null):void
[static]
Frame render callback that renders all sprites on the dirty list.
| DirtySprite | |
|
setEdgeProperties(vals:Object, opt:uint, trans:* = null, filter:* = null):Transitioner
Sets property values on edge sprites connected to this node.
| NodeSprite | ||
|
setNodeProperties(vals:Object, opt:uint, trans:* = null, filter:* = null):Transitioner
Sets property values on node sprites connected to this node.
| NodeSprite | ||
|
sortEdgesBy(opt:uint, ... sort):void
Sorts the order of connected edges according to their properties.
| NodeSprite | ||
![]() |
toString():String
| DirtySprite | |
![]() |
unfix(num:uint = 1):void
Decrements the fixed counter.
| DataSprite | |
|
visitEdges(f:Function, opt:uint, filter:* = null):Boolean
Visits this node's edges, invoking a function on each visited edge.
| NodeSprite | ||
|
visitNodes(f:Function, opt:uint, filter:* = null):Boolean
Visits the nodes connected to this node by edges, invoking a
function on each visited node.
| NodeSprite | ||
|
visitTreeBreadthFirst(f:Function):Boolean
Visits the subtree rooted at this node using a breadth first search,
invoking the input function on each visited node.
| NodeSprite | ||
|
visitTreeDepthFirst(f:Function, preorder:Boolean = false):Boolean
Visits the subtree rooted at this node using a depth first search,
invoking the input function on each visited node.
| NodeSprite | ||
| Constant | Defined by | ||
|---|---|---|---|
| ALL_LINKS : uint = 15 [static] Flag indicating all links, including graph and tree links.
| NodeSprite | ||
| CHILD_LINKS : uint = 4 [static] Flag indicating child links in a tree structure.
| NodeSprite | ||
| GRAPH_LINKS : uint = 3 [static] Flag indicating both inlinks and outlinks.
| NodeSprite | ||
| IN_LINKS : uint = 1 [static] Flag indicating inlinks, edges that point to this node.
| NodeSprite | ||
| OUT_LINKS : uint = 2 [static] Flag indicating outlinks, edges that point away from node.
| NodeSprite | ||
| PARENT_LINK : uint = 8 [static] Flag indicating the link to a parent in a tree structure.
| NodeSprite | ||
| REVERSE : uint = 16 [static] Flag indicating that a traversal should be performed in reverse.
| NodeSprite | ||
| TREE_LINKS : uint = 12 [static] Flag indicating both child and parent links.
| NodeSprite | ||
![]() | ZERO : Point [static] A constant for the point (0,0).
| DirtySprite | |
| angle | property |
angle:Number [write-only]Implementation
public function set angle(value:Number):void
| childDegree | property |
childDegree:uint [read-only]The number of child links.
Implementation public function get childDegree():uint
| degree | property |
degree:uint [read-only]The number of inlinks and outlinks.
Implementation public function get degree():uint
| depth | property |
depth:uint [read-only]The depth of this node in the tree structure. A value of zero indicates that this is a root node or that there is no tree.
Implementation public function get depth():uint
| expanded | property |
expanded:Boolean [read-write]Flag indicating if this node is currently expanded. This flag can be used by layout routines to expand/collapse connections.
Implementation public function get expanded():Boolean
public function set expanded(value:Boolean):void
| firstChildNode | property |
firstChildNode:NodeSprite [read-only]The first child of this node in the tree structure.
Implementation public function get firstChildNode():NodeSprite
| inDegree | property |
inDegree:uint [read-only]The number of inlinks.
Implementation public function get inDegree():uint
| lastChildNode | property |
lastChildNode:NodeSprite [read-only]The last child of this node in the tree structure.
Implementation public function get lastChildNode():NodeSprite
| nextNode | property |
nextNode:NodeSprite [read-only]The next sibling of this node in the tree structure.
Implementation public function get nextNode():NodeSprite
| outDegree | property |
outDegree:uint [read-only]The number of outlinks.
Implementation public function get outDegree():uint
| parentEdge | property |
parentEdge:EdgeSprite [read-write]The edge connecting this node to its parent in a tree structure.
Implementation public function get parentEdge():EdgeSprite
public function set parentEdge(value:EdgeSprite):void
| parentIndex | property |
parentIndex:int [read-write]The index of this node in its tree parent's child links list.
Implementation public function get parentIndex():int
public function set parentIndex(value:int):void
| parentNode | property |
parentNode:NodeSprite [read-only]The parent of this node in the tree structure.
Implementation public function get parentNode():NodeSprite
| prevNode | property |
prevNode:NodeSprite [read-only]The previous sibling of this node in the tree structure.
Implementation public function get prevNode():NodeSprite
| radius | property |
radius:Number [write-only]Implementation
public function set radius(value:Number):void
| x | property |
x:Number [write-only]Implementation
public function set x(value:Number):void
| y | property |
y:Number [write-only]Implementation
public function set y(value:Number):void
| addChildEdge | () | method |
public function addChildEdge(e:EdgeSprite):uintAdds a child edge to this node.
Parameterse:EdgeSprite — the edge to add to the child links list
|
uint — the index of the added edge in the list
|
| addInEdge | () | method |
public function addInEdge(e:EdgeSprite):uintAdds an inlink edge to this node.
Parameterse:EdgeSprite — the edge to add to the inlinks list
|
uint — the index of the added edge in the list
|
| addOutEdge | () | method |
public function addOutEdge(e:EdgeSprite):uintAdds an outlink edge to this node.
Parameterse:EdgeSprite — the edge to add to the outlinks list
|
uint — the index of the added edge in the list
|
| getChildEdge | () | method |
public function getChildEdge(i:uint):EdgeSpriteGets the child edge at the specified position
Parametersi:uint — the position of the child edge
|
EdgeSprite —
the child edge
|
| getChildNode | () | method |
public function getChildNode(i:uint):NodeSpriteGets the child node at the specified position
Parametersi:uint — the position of the child node
|
NodeSprite —
the child node
|
| getInEdge | () | method |
public function getInEdge(i:uint):EdgeSpriteGets the inlink edge at the specified position
Parametersi:uint — the position of the inlink edge
|
EdgeSprite —
the inlink edge
|
| getInNode | () | method |
public function getInNode(i:uint):NodeSpriteGets the inlink node at the specified position
Parametersi:uint — the position of the inlink node
|
NodeSprite —
the inlink node
|
| getOutEdge | () | method |
public function getOutEdge(i:uint):EdgeSpriteGets the outlink edge at the specified position
Parametersi:uint — the position of the outlink edge
|
EdgeSprite —
the outlink edge
|
| getOutNode | () | method |
public function getOutNode(i:uint):NodeSpriteGets the outlink node at the specified position
Parametersi:uint — the position of the outlink node
|
NodeSprite —
the outlink node
|
| isConnected | () | method |
public function isConnected(n:NodeSprite, opt:uint):BooleanIndicates if the input node is connected to this node by an edge.
Parametersn:NodeSprite — the node to check for connection
|
|
opt:uint — flag indicating which links to check
|
Boolean — true if connected, false otherwise
|
| removeAllEdges | () | method |
public function removeAllEdges():voidRemoves all edges incident on this node. Note that this method does not update the edges themselves or the other nodes.
| removeChildEdge | () | method |
public function removeChildEdge(e:EdgeSprite):voidRemoves an edge from the child links list. Note that this method does not update the edge itself or the other node.
Parameterse:EdgeSprite — the edge to remove
|
| removeEdges | () | method |
public function removeEdges(type:int):voidRemoves all edges of the indicated edge type. Note that this method does not update the edges themselves or the other nodes.
Parameterstype:int — the type of edges to remove. For example, IN_LINKS,
OUT_LINKS, TREE_LINKS, etc.
|
| removeInEdge | () | method |
public function removeInEdge(e:EdgeSprite):voidRemoves an edge from the inlinks list. Note that this method does not update the edge itself or the other node.
Parameterse:EdgeSprite — the edge to remove
|
| removeOutEdge | () | method |
public function removeOutEdge(e:EdgeSprite):voidRemoves an edge from the outlinks list. Note that this method does not update the edge itself or the other node.
Parameterse:EdgeSprite — the edge to remove
|
| setEdgeProperties | () | method |
public function setEdgeProperties(vals:Object, opt:uint, trans:* = null, filter:* = null):TransitionerSets property values on edge sprites connected to this node.
Parametersvals:Object — an object containing the properties and values to set.
|
|
opt:uint — flag indicating which sets of edges should be traversed
|
|
trans:* (default = null) — a transitioner or time span for updating object values.
If the input is a transitioner, it will be used to store the
updated values. If the input is a number, a new Transitioner with
duration set to the input value will be used. The input is null by
default, in which case object values are updated immediately.
|
|
filter:* (default = null) — an optional Boolean-valued filter function for
limiting which items are visited
|
Transitioner —
the transitioner used to update the values
|
| setNodeProperties | () | method |
public function setNodeProperties(vals:Object, opt:uint, trans:* = null, filter:* = null):TransitionerSets property values on node sprites connected to this node.
Parametersvals:Object — an object containing the properties and values to set.
|
|
opt:uint — flag indicating which sets of nodes should be traversed
|
|
trans:* (default = null) — a transitioner or time span for updating object values.
If the input is a transitioner, it will be used to store the
updated values. If the input is a number, a new Transitioner with
duration set to the input value will be used. The input is null by
default, in which case object values are updated immediately.
|
|
filter:* (default = null) — an optional Boolean-valued filter function for
limiting which items are visited
|
Transitioner —
the transitioner used to update the values
|
| sortEdgesBy | () | method |
public function sortEdgesBy(opt:uint, ... sort):voidSorts the order of connected edges according to their properties. Each type of edge (in, out, or child) is sorted separately.
Parametersopt:uint — flag indicating which set(s) of edges should be sorted
|
|
... sort — the sort arguments.
If a String is provided, the data will be sorted in ascending order
according to the data field named by the string.
If an Array is provided, the data will be sorted according to the
fields in the array. In addition, field names can optionally
be followed by a boolean value. If true, the data is sorted in
ascending order (the default). If false, the data is sorted in
descending order.
|
| visitEdges | () | method |
public function visitEdges(f:Function, opt:uint, filter:* = null):BooleanVisits this node's edges, invoking a function on each visited edge.
Parametersf:Function — the function to invoke on the edges. If the function
returns true, the visitation is ended with an early exit.
|
|
opt:uint — flag indicating which sets of edges should be visited
|
|
filter:* (default = null) |
Boolean — true if the visitation was interrupted with an early exit
|
| visitNodes | () | method |
public function visitNodes(f:Function, opt:uint, filter:* = null):BooleanVisits the nodes connected to this node by edges, invoking a function on each visited node.
Parametersf:Function — the function to invoke on the nodes. If the function
returns true, the visitation is ended with an early exit.
|
|
opt:uint — flag indicating which sets of edges should be traversed
|
|
filter:* (default = null) |
Boolean — true if the visitation was interrupted with an early exit
|
| visitTreeBreadthFirst | () | method |
public function visitTreeBreadthFirst(f:Function):BooleanVisits the subtree rooted at this node using a breadth first search, invoking the input function on each visited node.
Parametersf:Function — the function to invoke on the nodes. If the function
returns true, the visitation is ended with an early exit.
|
Boolean — true if the visitation was interrupted with an early exit
|
| visitTreeDepthFirst | () | method |
public function visitTreeDepthFirst(f:Function, preorder:Boolean = false):BooleanVisits the subtree rooted at this node using a depth first search, invoking the input function on each visited node.
Parametersf:Function — the function to invoke on the nodes. If the function
returns true, the visitation is ended with an early exit.
|
|
preorder:Boolean (default = false) — if true, nodes are visited in a pre-order traversal;
if false, they are visited in a post-order traversal
|
Boolean — true if the visitation was interrupted with an early exit
|
| ALL_LINKS | constant |
public static const ALL_LINKS:uint = 15Flag indicating all links, including graph and tree links.
| CHILD_LINKS | constant |
public static const CHILD_LINKS:uint = 4Flag indicating child links in a tree structure.
| GRAPH_LINKS | constant |
public static const GRAPH_LINKS:uint = 3Flag indicating both inlinks and outlinks.
| IN_LINKS | constant |
public static const IN_LINKS:uint = 1Flag indicating inlinks, edges that point to this node.
| OUT_LINKS | constant |
public static const OUT_LINKS:uint = 2Flag indicating outlinks, edges that point away from node.
| PARENT_LINK | constant |
public static const PARENT_LINK:uint = 8Flag indicating the link to a parent in a tree structure.
| REVERSE | constant |
public static const REVERSE:uint = 16Flag indicating that a traversal should be performed in reverse.
| TREE_LINKS | constant |
public static const TREE_LINKS:uint = 12Flag indicating both child and parent links.