| Package | com.asterisq.graph.views |
| Class | public class MaxNodesGraphView |
| Inheritance | MaxNodesGraphView SynchronizedGraphView flash.events.EventDispatcher |
| Implements | IGraphView |
A node comparator function can be specified to arrange nodes in order
of importance. See the nodeComparator property for details.
Protected nodes can also be specified. These nodes always be included in the view, even if it means breaking the maximum node limit.
| Property | Defined by | ||
|---|---|---|---|
![]() | automaticViewInvalidation : Boolean
Indicates whether the view is automatically invalidated when the model changes.
| SynchronizedGraphView | |
| maxNodes : int
The maximum number of nodes allowed in the view.
| MaxNodesGraphView | ||
![]() | model : IGraph
The model from which the contents of this view is calculated.
| SynchronizedGraphView | |
| nodeComparator : Function
The comparator function for sorting nodes before filtering.
| MaxNodesGraphView | ||
| protectedNodeIDs : Array
IDs of nodes that should never be removed.
| MaxNodesGraphView | ||
![]() | view : IGraph
The calculated contents of this view.
| SynchronizedGraphView | |
![]() | viewInvalid : Boolean
Indicates whether the view is currently invalid.
| SynchronizedGraphView | |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new TreeGraphView.
| MaxNodesGraphView | ||
![]() |
invalidate():void
Schedules the view for validation during the next render cycle.
| SynchronizedGraphView | |
![]() |
validateNow():void
Immediately recalculates the view.
| SynchronizedGraphView | |
| Method | Defined by | ||
|---|---|---|---|
|
validate():Boolean
Recalculates the contents of the view from the model data.
| MaxNodesGraphView | ||
| maxNodes | property |
maxNodes:int [read-write]The maximum number of nodes allowed in the view. Default is 20.
Implementation public function get maxNodes():int
public function set maxNodes(value:int):void
| nodeComparator | property |
nodeComparator:Function [read-write]The comparator function for sorting nodes before filtering. The function should take two INodes, A and B, as arguments and return a negative integer, zero, or a positive integer.
If the comparator is null, no sorting will be performed.
Implementation public function get nodeComparator():Function
public function set nodeComparator(value:Function):void
| protectedNodeIDs | property |
protectedNodeIDs:Array [read-write]IDs of nodes that should never be removed. These nodes will be included in the view even if it breaks the maximum nodes limit.
Implementation public function get protectedNodeIDs():Array
public function set protectedNodeIDs(value:Array):void
| MaxNodesGraphView | () | constructor |
public function MaxNodesGraphView()Creates a new TreeGraphView.
| validate | () | method |
protected override function validate():BooleanRecalculates the contents of the view from the model data.
ReturnsBoolean |