Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class AspectRatioComponentLayerer
InheritanceAspectRatioComponentLayerer Inheritance YObject Inheritance Object
Implements Layerer

Wrapper Layerer implementation that delegates the actual layering to a delegate Layerer. If the graph consists of multiple components, they will be identified and each of the components will be layered separately using the delegate Layerer instance. After that they will all be merged such that the desired aspect ratio is fulfilled best. Note that for grouped graphs the desired aspect ratio is also considered for each group node separately.

See also

desiredAspectRatio
com.yworks.yfiles.layout.hierarchic.incremental.MultiComponentLayerer


Public Properties
 PropertyDefined By
  considerNodeSize : Boolean
Getter: Returns whether the node size should be considered.
AspectRatioComponentLayerer
  desiredAspectRatio : Number
Specifies the desired aspect ratio.
AspectRatioComponentLayerer
  singleComponentLayerer : Layerer
Getter: Returns the Layerer instance that is used for delegation.
AspectRatioComponentLayerer
Public Methods
 MethodDefined By
  
AspectRatioComponentLayerer(singleComponentLayerer:Layerer, init:Boolean = true)
Creates a new instance of AspectRatioComponentLayerer using the given delegate.
AspectRatioComponentLayerer
  
AspectRatioComponentLayerer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
AspectRatioComponentLayerer
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of AspectRatioComponentLayerer using the given delegate.
AspectRatioComponentLayerer
Protected Methods
 MethodDefined By
  
initAspectRatioComponentLayerer(singleComponentLayerer:Layerer):void
Initializes this object.
AspectRatioComponentLayerer
Property Detail
considerNodeSizeproperty
considerNodeSize:Boolean

Getter: Returns whether the node size should be considered.

Setter: Whether or not the node size should be considered. If this option is disabled, all nodes are considered to be of equal size. Hence, the given aspect ratio specifies the ratio between the number of nodes within a layer and the overall number of layers. The default value is true.


Implementation
    public function get considerNodeSize():Boolean
    public function set considerNodeSize(value:Boolean):void
desiredAspectRatioproperty 
desiredAspectRatio:Number

Specifies the desired aspect ratio. If the graph consists of multiple components, they will be identified and each of the components will be layered separately using the delegate Layerer instance. After that they will all be merged such that the desired aspect ratio is fulfilled best. Note that for grouped graphs the desired aspect ratio is also considered for each group node separately.


Implementation
    public function get desiredAspectRatio():Number
    public function set desiredAspectRatio(value:Number):void
singleComponentLayererproperty 
singleComponentLayerer:Layerer

Getter: Returns the Layerer instance that is used for delegation.

Setter: Sets the new delegate Layerer instance.


Implementation
    public function get singleComponentLayerer():Layerer
    public function set singleComponentLayerer(value:Layerer):void

Throws
ReferenceError — if the argument is null
Constructor Detail
AspectRatioComponentLayerer()Constructor
public function AspectRatioComponentLayerer(singleComponentLayerer:Layerer, init:Boolean = true)

Creates a new instance of AspectRatioComponentLayerer using the given delegate.

Parameters
singleComponentLayerer:Layerer
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
assignLayers()method
public function assignLayers(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

getClass()method 
override public function getClass():Class

Returns
Class
initAspectRatioComponentLayerer()method 
protected final function initAspectRatioComponentLayerer(singleComponentLayerer:Layerer):void

Initializes this object. See the documentation of the corresponding factory method newAspectRatioComponentLayerer() for details.

Parameters

singleComponentLayerer:Layerer

See also

newAspectRatioComponentLayerer()method 
public static function newAspectRatioComponentLayerer(singleComponentLayerer:Layerer):AspectRatioComponentLayerer

Creates a new instance of AspectRatioComponentLayerer using the given delegate.

Parameters

singleComponentLayerer:Layerer

Returns
AspectRatioComponentLayerer