| Package | com.asterisq.graph.views |
| Class | public class MaxNeighborsGraphView |
| Inheritance | MaxNeighborsGraphView SynchronizedGraphView flash.events.EventDispatcher |
| Implements | IGraphView |
Nodes with more edges are dealt with first. Edges connecting nodes with the most neighbors are removed first if the number of neighbors is above the limit.
If a node with too many connections has no neighbors that are above the edge limit, connections to neighbors with the fewest edges are removed. This is done to preserve as much data as possible.
| Property | Defined by | ||
|---|---|---|---|
![]() | automaticViewInvalidation : Boolean
Indicates whether the view is automatically invalidated when the model changes.
| SynchronizedGraphView | |
| maxNeighbors : int
The maximum number of neighbors allowed for each node in the view.
| MaxNeighborsGraphView | ||
![]() | model : IGraph
The model from which the contents of this view is calculated.
| SynchronizedGraphView | |
| protectedNodeIDs : Array
IDs of nodes that should never be removed.
| MaxNeighborsGraphView | ||
![]() | 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 MaxNeighborsGraphView.
| MaxNeighborsGraphView | ||
![]() |
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.
| MaxNeighborsGraphView | ||
| maxNeighbors | property |
maxNeighbors:int [read-write]The maximum number of neighbors allowed for each node in the view. The default is 10.
Implementation public function get maxNeighbors():int
public function set maxNeighbors(value:int):void
| protectedNodeIDs | property |
protectedNodeIDs:Array [read-write]IDs of nodes that should never be removed. These nodes will always be included in the view, even if it breaks the maximum neighbors limit.
Implementation public function get protectedNodeIDs():Array
public function set protectedNodeIDs(value:Array):void
| MaxNeighborsGraphView | () | constructor |
public function MaxNeighborsGraphView()Creates a new MaxNeighborsGraphView.
| validate | () | method |
protected override function validate():BooleanRecalculates the contents of the view from the model data.
ReturnsBoolean |