Packagecom.yworks.yfiles.layout.organic
Classpublic class OrganicRemoveOverlapsStage
InheritanceOrganicRemoveOverlapsStage Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

This LayoutStage removes node overlaps considering the specified minimal node distance. Unlike the approach implemented in class com.yworks.yfiles.layout.organic.RemoveOverlapsLayoutStage, this approach tries to keep the original layout structure, i.e., it tries to keep the geometric distance between the nodes. Therefore, it uses a similar strategy than organic layout algorithms. Thus, it is especially suited to remove node overlaps in undirected graph drawings with straight-line edge routes, e.g., layouts produced by the organic layouter.

See also

com.yworks.yfiles.layout.organic.RemoveOverlapsLayoutStage


Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  maximumDuration : LongImpl
Getter: Returns the time limit (in milliseconds) set for the layout stage (not including the time required by the core layouter).
OrganicRemoveOverlapsStage
  minimalNodeDistance : Number
Specifies the current minimal node distance this layout stage should enforce.
OrganicRemoveOverlapsStage
Public Methods
 MethodDefined By
  
OrganicRemoveOverlapsStage(init:Boolean = true)
Creates a new instance of OrganicRemoveOverlapsStage
OrganicRemoveOverlapsStage
  
canLayout(graph:LayoutGraph):Boolean
[override]
OrganicRemoveOverlapsStage
  
doLayout(graph:LayoutGraph):void
[override]
OrganicRemoveOverlapsStage
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
OrganicRemoveOverlapsStage
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of OrganicRemoveOverlapsStage
OrganicRemoveOverlapsStage
  
[static] Creates a new instance of OrganicRemoveOverlapsStage
OrganicRemoveOverlapsStage
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
Initializes this object.
OrganicRemoveOverlapsStage
  
Initializes this object.
OrganicRemoveOverlapsStage
Public Constants
 ConstantDefined By
  FIXED_NODE_DPKEY : Object = y.layout.organic.OrganicRemoveOverlapsStage.FIXED_NODE_DPKEY
[static] This key can be used to specify a boolean value that can be used to mark fixed nodes.
OrganicRemoveOverlapsStage
Property Detail
maximumDurationproperty
maximumDuration:LongImpl

Getter: Returns the time limit (in milliseconds) set for the layout stage (not including the time required by the core layouter).

Setter: Sets a preferred time limit (>= 0 and in milliseconds) for the layout stage (not including the time required by the core layouter).

Note that restricting the maximum duration may result in a worse layout quality, i.e., there could be still some node overlaps. Furthermore, the actual runtime may exceed the maximum duration since the layout algorithm still has to find a valid solution.


Implementation
    public function get maximumDuration():LongImpl
    public function set maximumDuration(value:LongImpl):void
minimalNodeDistanceproperty 
minimalNodeDistance:Number

Specifies the current minimal node distance this layout stage should enforce.

The default value is 10.


Implementation
    public function get minimalNodeDistance():Number
    public function set minimalNodeDistance(value:Number):void
Constructor Detail
OrganicRemoveOverlapsStage()Constructor
public function OrganicRemoveOverlapsStage(init:Boolean = true)

Creates a new instance of OrganicRemoveOverlapsStage

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

Parameters

graph:LayoutGraph

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

Parameters

graph:LayoutGraph

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

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

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

See also

initOrganicRemoveOverlapsStage2()method 
protected final function initOrganicRemoveOverlapsStage2(core:Layouter):void

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

Parameters

core:Layouter

See also

newOrganicRemoveOverlapsStage1()method 
public static function newOrganicRemoveOverlapsStage1():OrganicRemoveOverlapsStage

Creates a new instance of OrganicRemoveOverlapsStage

Returns
OrganicRemoveOverlapsStage
newOrganicRemoveOverlapsStage2()method 
public static function newOrganicRemoveOverlapsStage2(core:Layouter):OrganicRemoveOverlapsStage

Creates a new instance of OrganicRemoveOverlapsStage

Parameters

core:Layouter

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

This key can be used to specify a boolean value that can be used to mark fixed nodes.