Packagecom.yworks.yfiles.layout.organic
Classpublic class ShuffleLayouter
InheritanceShuffleLayouter Inheritance YObject Inheritance Object
Implements LayoutStage

This layout stage removes node overlaps in a layout graph by using a method which is based on a famous russian arcade game.



Public Properties
 PropertyDefined By
  barycenterModeActive : Boolean
Getter: Returns true if this layouter uses a barycenter based node shuffling strategy and false otherwise.
ShuffleLayouter
  coreLayouter : Layouter
Specifies the core layouter.
ShuffleLayouter
  horizontalOverlapCriterium : int
Specifies the horizontal overlap criterion.
ShuffleLayouter
  minimalNodeDistance : Number
Specifies the minimal distance between nodes that has to be obeyed by this layouter.
ShuffleLayouter
  simpleModeActive : Boolean
Getter: Returns whether or not simple mode is active.
ShuffleLayouter
Public Methods
 MethodDefined By
  
ShuffleLayouter(init:Boolean = true)
Creates a new instance of ShuffleLayouter.
ShuffleLayouter
  
canLayout(graph:LayoutGraph):Boolean
ShuffleLayouter
  
doLayout(graph:LayoutGraph):void
Performs the force transfer algorithm on the given graph after the core layouter has performed its job.
ShuffleLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
ShuffleLayouter
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of ShuffleLayouter.
ShuffleLayouter
Protected Methods
 MethodDefined By
  
Initializes this object.
ShuffleLayouter
Public Constants
 ConstantDefined By
  FIXED_NODE_DPKEY : Object = y.layout.organic.ShuffleLayouter.FIXED_NODE_DPKEY
[static] This key can be used to specify whether or not a node's position should remain fixed.
ShuffleLayouter
  HOC_INTERSECTION_BOX : int = 0
[static] Horizontal overlap criteria enumeration constant.
ShuffleLayouter
  HOC_LESS_MOVEMENT : int = 2
[static] Horizontal overlap criteria enumeration constant.
ShuffleLayouter
  HOC_NODE_CENTER : int = 1
[static] Horizontal overlap criteria enumeration constant.
ShuffleLayouter
  MINIMAL_DISTANCE_DPKEY : Object = y.layout.organic.ShuffleLayouter.MINIMAL_DISTANCE_DPKEY
[static] This key can be used to specify a minimal distance for each single node in the graph using a data provider.
ShuffleLayouter
Property Detail
barycenterModeActiveproperty
barycenterModeActive:Boolean

Getter: Returns true if this layouter uses a barycenter based node shuffling strategy and false otherwise.

Setter: Specifies whether or not this layouter should use a barycenter based node shuffling strategy.


Implementation
    public function get barycenterModeActive():Boolean
    public function set barycenterModeActive(value:Boolean):void
coreLayouterproperty 
coreLayouter:Layouter

Specifies the core layouter.


Implementation
    public function get coreLayouter():Layouter
    public function set coreLayouter(value:Layouter):void
horizontalOverlapCriteriumproperty 
horizontalOverlapCriterium:int

Specifies the horizontal overlap criterion. One of HOC_INTERSECTION_BOX, HOC_LESS_MOVEMENT and HOC_NODE_CENTER


Implementation
    public function get horizontalOverlapCriterium():int
    public function set horizontalOverlapCriterium(value:int):void

See also

minimalNodeDistanceproperty 
minimalNodeDistance:Number

Specifies the minimal distance between nodes that has to be obeyed by this layouter.


Implementation
    public function get minimalNodeDistance():Number
    public function set minimalNodeDistance(value:Number):void
simpleModeActiveproperty 
simpleModeActive:Boolean

Getter: Returns whether or not simple mode is active.

Setter: Specifies whether or not to activate a simple layout mode. When in simple mode the algorithm is very fast but the quality of the resulting layout may be poor. When not active the resulting layout is better and the running time is higher.

By default simple mode is not active.


Implementation
    public function get simpleModeActive():Boolean
    public function set simpleModeActive(value:Boolean):void
Constructor Detail
ShuffleLayouter()Constructor
public function ShuffleLayouter(init:Boolean = true)

Creates a new instance of ShuffleLayouter.

Parameters
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
canLayout()method
public function canLayout(graph:LayoutGraph):Boolean

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
public function doLayout(graph:LayoutGraph):void

Performs the force transfer algorithm on the given graph after the core layouter has performed its job.

Parameters

graph:LayoutGraph

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

Returns
Class
initShuffleLayouter()method 
protected final function initShuffleLayouter():void

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

See also

newShuffleLayouter()method 
public static function newShuffleLayouter():ShuffleLayouter

Creates a new instance of ShuffleLayouter.

Returns
ShuffleLayouter
Constant Detail
FIXED_NODE_DPKEYConstant
public static const FIXED_NODE_DPKEY:Object = y.layout.organic.ShuffleLayouter.FIXED_NODE_DPKEY

This key can be used to specify whether or not a node's position should remain fixed. The corresponding data provider's com.yworks.yfiles.base.DataProvider.getBool() method is used to determine which nodes are fixed.

See also

HOC_INTERSECTION_BOXConstant 
public static const HOC_INTERSECTION_BOX:int = 0

Horizontal overlap criteria enumeration constant.

HOC_LESS_MOVEMENTConstant 
public static const HOC_LESS_MOVEMENT:int = 2

Horizontal overlap criteria enumeration constant.

HOC_NODE_CENTERConstant 
public static const HOC_NODE_CENTER:int = 1

Horizontal overlap criteria enumeration constant.

MINIMAL_DISTANCE_DPKEYConstant 
public static const MINIMAL_DISTANCE_DPKEY:Object = y.layout.organic.ShuffleLayouter.MINIMAL_DISTANCE_DPKEY

This key can be used to specify a minimal distance for each single node in the graph using a data provider. Note that values must be strictly positive.