Packagecom.yworks.yfiles.layout.organic
Classpublic class RemoveOverlapsLayoutStage
InheritanceRemoveOverlapsLayoutStage Inheritance YObject Inheritance Object
Implements LayoutStage

This LayoutStage removes node overlaps and guarantees a certain minimal node distance.



Public Properties
 PropertyDefined By
  coreLayouter : Layouter
Specifies the core layouter.
RemoveOverlapsLayoutStage
  hInternal : Vector.<Number>
[read-only]
RemoveOverlapsLayoutStage
  wInternal : Vector.<Number>
[read-only]
RemoveOverlapsLayoutStage
  xInternal : Vector.<Number>
[read-only]
RemoveOverlapsLayoutStage
  yInternal : Vector.<Number>
[read-only]
RemoveOverlapsLayoutStage
Protected Properties
 PropertyDefined By
  graph : LayoutGraph
the graph
RemoveOverlapsLayoutStage
  h : Vector.<Number>
heights based on node-indices
RemoveOverlapsLayoutStage
  nodes : Vector.<Object>
the node array
RemoveOverlapsLayoutStage
  random : YRandom
the source of randomness
RemoveOverlapsLayoutStage
  w : Vector.<Number>
widths based on node-indices
RemoveOverlapsLayoutStage
  x : Vector.<Number>
x coordinates based on node-indices
RemoveOverlapsLayoutStage
  y : Vector.<Number>
y coordinates based on node-indices
RemoveOverlapsLayoutStage
Public Methods
 MethodDefined By
  
RemoveOverlapsLayoutStage(minDist:Number, init:Boolean = true)
Creates a new instance of RemoveOverlapsLayoutStage
RemoveOverlapsLayoutStage
  
canLayout(graph:LayoutGraph):Boolean
RemoveOverlapsLayoutStage
  
doLayout(graph:LayoutGraph):void
Assigns a new graph layout to the given layout graph.
RemoveOverlapsLayoutStage
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
RemoveOverlapsLayoutStage
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of RemoveOverlapsLayoutStage
RemoveOverlapsLayoutStage
  
[static] Creates a new instance of RemoveOverlapsLayoutStage
RemoveOverlapsLayoutStage
Protected Methods
 MethodDefined By
  
initRemoveOverlapsLayoutStage1(minDist:Number):void
Initializes this object.
RemoveOverlapsLayoutStage
  
initRemoveOverlapsLayoutStage2(random:YRandom, minDist:Number):void
Initializes this object.
RemoveOverlapsLayoutStage
  
updatePos():void
updates arrays x and y according to the current centers of the nodes
RemoveOverlapsLayoutStage
Property Detail
coreLayouterproperty
coreLayouter:Layouter

Specifies the core layouter.


Implementation
    public function get coreLayouter():Layouter
    public function set coreLayouter(value:Layouter):void
graphproperty 
protected var graph:LayoutGraph

the graph

hproperty 
protected var h:Vector.<Number>

heights based on node-indices

hInternalproperty 
hInternal:Vector.<Number>  [read-only]


Implementation
    public function get hInternal():Vector.<Number>
nodesproperty 
protected var nodes:Vector.<Object>

the node array

randomproperty 
protected var random:YRandom

the source of randomness

wproperty 
protected var w:Vector.<Number>

widths based on node-indices

wInternalproperty 
wInternal:Vector.<Number>  [read-only]


Implementation
    public function get wInternal():Vector.<Number>
xproperty 
protected var x:Vector.<Number>

x coordinates based on node-indices

xInternalproperty 
xInternal:Vector.<Number>  [read-only]


Implementation
    public function get xInternal():Vector.<Number>
yproperty 
protected var y:Vector.<Number>

y coordinates based on node-indices

yInternalproperty 
yInternal:Vector.<Number>  [read-only]


Implementation
    public function get yInternal():Vector.<Number>
Constructor Detail
RemoveOverlapsLayoutStage()Constructor
public function RemoveOverlapsLayoutStage(minDist:Number, init:Boolean = true)

Creates a new instance of RemoveOverlapsLayoutStage

Parameters
minDist:Number
 
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

Assigns a new graph layout to the given layout graph.

Parameters

graph:LayoutGraph

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

Returns
Class
initRemoveOverlapsLayoutStage1()method 
protected final function initRemoveOverlapsLayoutStage1(minDist:Number):void

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

Parameters

minDist:Number

See also

initRemoveOverlapsLayoutStage2()method 
protected final function initRemoveOverlapsLayoutStage2(random:YRandom, minDist:Number):void

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

Parameters

random:YRandom
 
minDist:Number

See also

newRemoveOverlapsLayoutStage1()method 
public static function newRemoveOverlapsLayoutStage1(minDist:Number):RemoveOverlapsLayoutStage

Creates a new instance of RemoveOverlapsLayoutStage

Parameters

minDist:Number

Returns
RemoveOverlapsLayoutStage
newRemoveOverlapsLayoutStage2()method 
public static function newRemoveOverlapsLayoutStage2(random:YRandom, minDist:Number):RemoveOverlapsLayoutStage

Creates a new instance of RemoveOverlapsLayoutStage

Parameters

random:YRandom
 
minDist:Number

Returns
RemoveOverlapsLayoutStage
updatePos()method 
protected function updatePos():void

updates arrays x and y according to the current centers of the nodes