Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class DefaultDrawingDistanceCalculator
InheritanceDefaultDrawingDistanceCalculator Inheritance YObject Inheritance Object
Implements DrawingDistanceCalculator

A default com.yworks.yfiles.layout.hierarchic.incremental.DrawingDistanceCalculator implementation that is used by com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl to configure the com.yworks.yfiles.layout.hierarchic.incremental.NodePlacer.

See also

com.yworks.yfiles.layout.hierarchic.incremental.DrawingDistanceCalculator
com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl
com.yworks.yfiles.layout.hierarchic.incremental.NodePlacer


Public Properties
 PropertyDefined By
  compaction : Boolean
Specifies whether or not the compaction option is enabled.
DefaultDrawingDistanceCalculator
  edge2EdgeDistance : Number
Specifies the minimum distance between two edges.
DefaultDrawingDistanceCalculator
  node2EdgeDistance : Number
Specifies the minimum distance between a node and an (non-adjacent) edge.
DefaultDrawingDistanceCalculator
  node2NodeDistance : Number
Specifies the minimum distance between two nodes.
DefaultDrawingDistanceCalculator
  optimizeSwimLaneDistances : Boolean
Specifies whether or not to use an optimized minimum distance calculation for swim lane layouts.
DefaultDrawingDistanceCalculator
  useAdaptiveMinEdgeDistance : Boolean
Specifies whether or not an adaptive minimum edge distance should be used.
DefaultDrawingDistanceCalculator
Public Methods
 MethodDefined By
  
Creates a new instance of DefaultDrawingDistanceCalculator with default settings.
DefaultDrawingDistanceCalculator
  
dispose(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void
DefaultDrawingDistanceCalculator
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
DefaultDrawingDistanceCalculator
  
getMinDistance(graph:LayoutGraph, layer:Layer, ldp:LayoutDataProvider, left:Node, right:Node):Number
DefaultDrawingDistanceCalculator
 Inherited
hashCode():int
YObject
  
DefaultDrawingDistanceCalculator
  
[static] Creates a new instance of DefaultDrawingDistanceCalculator with default settings.
DefaultDrawingDistanceCalculator
Protected Methods
 MethodDefined By
  
Initializes this object.
DefaultDrawingDistanceCalculator
Property Detail
compactionproperty
compaction:Boolean

Specifies whether or not the compaction option is enabled. If it is enabled adjacent layer elements may be placed in a stacked style (i.e., horizontally interleaving). By default this option is disabled.


Implementation
    public function get compaction():Boolean
    public function set compaction(value:Boolean):void
edge2EdgeDistanceproperty 
edge2EdgeDistance:Number

Specifies the minimum distance between two edges. Default is 20.0d.


Implementation
    public function get edge2EdgeDistance():Number
    public function set edge2EdgeDistance(value:Number):void
node2EdgeDistanceproperty 
node2EdgeDistance:Number

Specifies the minimum distance between a node and an (non-adjacent) edge. Default is 15.0d.


Implementation
    public function get node2EdgeDistance():Number
    public function set node2EdgeDistance(value:Number):void
node2NodeDistanceproperty 
node2NodeDistance:Number

Specifies the minimum distance between two nodes. Default is 30.0d.


Implementation
    public function get node2NodeDistance():Number
    public function set node2NodeDistance(value:Number):void
optimizeSwimLaneDistancesproperty 
optimizeSwimLaneDistances:Boolean

Specifies whether or not to use an optimized minimum distance calculation for swim lane layouts. If set to true this instance will report 0.0d as the minimum distance between two nodes if they belong to different swim lanes. This avoids unwanted feedback between different swim lanes during node placement.


Implementation
    public function get optimizeSwimLaneDistances():Boolean
    public function set optimizeSwimLaneDistances(value:Boolean):void
useAdaptiveMinEdgeDistanceproperty 
useAdaptiveMinEdgeDistance:Boolean

Specifies whether or not an adaptive minimum edge distance should be used. If this option is enabled the minimum distance between two adjacent edges is the minimum of the set minimum edge distance and the distance of the edges' source/target points. By default this option is enabled.


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

Creates a new instance of DefaultDrawingDistanceCalculator with default settings.

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
dispose()method
public function dispose(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

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

Returns
Class
getMinDistance()method 
public function getMinDistance(graph:LayoutGraph, layer:Layer, ldp:LayoutDataProvider, left:Node, right:Node):Number

Parameters

graph:LayoutGraph
 
layer:Layer
 
ldp:LayoutDataProvider
 
left:Node
 
right:Node

Returns
Number
initDefaultDrawingDistanceCalculator()method 
protected final function initDefaultDrawingDistanceCalculator():void

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

See also

initialize()method 
public function initialize(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

newDefaultDrawingDistanceCalculator()method 
public static function newDefaultDrawingDistanceCalculator():DefaultDrawingDistanceCalculator

Creates a new instance of DefaultDrawingDistanceCalculator with default settings.

Returns
DefaultDrawingDistanceCalculator