This layerer implementation layers the nodes by given layer IDs.
The layer IDs are given by a DataProvider that returns the integral layer ID of each node in the graph.
public function GivenLayersLayerer(init:Boolean = true)
Parameters | init:Boolean (default = true )
|
public function assignLayers(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void
Parameters
public function assignNodeLayer(g:LayoutGraph, layerMap:NodeMap, reversedEdges:EdgeList):int
Assigns layers to the graph that were given by the DataProvider g.getDataProvider(LAYER_ID_KEY)
.
The returned layerMap will be a normalized variant of the user given data provider. A normalized variant has no empty layers and a minimum layerID 0.
Parameters
Returnsoverride public function getClass():Class
Returns protected final function initGivenLayersLayerer():void
public static function newGivenLayersLayerer():GivenLayersLayerer
Returns public function normalize(g:Graph, layerId:DataProvider, normalizedLayerId:DataAcceptor):int
Convenience method which removes empty layers and ensures that the smallest layer has value 0.
Parameters
| g:Graph |
|
| layerId:DataProvider — provides the current layer ids for nodes in g
|
|
| normalizedLayerId:DataAcceptor — accepts the new layer ids that result after normalization.
|
Returns | int — The amount of layers left after removing all empty layers.
|
public static const LAYER_ID_KEY:Object = y.layout.hierarchic.GivenLayersLayerer.LAYER_ID_KEY
The key used by this class to query a graph for a DataProvider that yields the layerID for each node in the graph.
Wed Oct 7 2015, 04:43 PM +02:00