Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class TypeBasedDrawingDistanceCalculator
InheritanceTypeBasedDrawingDistanceCalculator Inheritance YObject Inheritance Object
Implements DrawingDistanceCalculator

This implementation returns the minimum distances for each kind of node pair based on their type as returned by com.yworks.yfiles.layout.hierarchic.incremental.NodeData.type

See also

com.yworks.yfiles.layout.hierarchic.incremental.NodeData.type


Public Properties
 PropertyDefined By
  edge2EdgeDistance : Number
Specifies the distance between edges.
TypeBasedDrawingDistanceCalculator
  minimumFirstSegmentLength : Number
Specifies the minimum length of the first and last segment of an edge.
TypeBasedDrawingDistanceCalculator
  node2EdgeDistance : Number
Specifies the distance between nodes and edges.
TypeBasedDrawingDistanceCalculator
  node2NodeDistance : Number
Specifies the distance between nodes.
TypeBasedDrawingDistanceCalculator
  useCompaction : Boolean
Specifies whether or not the compaction option is enabled.
TypeBasedDrawingDistanceCalculator
Public Methods
 MethodDefined By
  
Creates a new instance of TypeBasedDrawingDistanceCalculator
TypeBasedDrawingDistanceCalculator
  
dispose(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void
TypeBasedDrawingDistanceCalculator
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
TypeBasedDrawingDistanceCalculator
  
getMinDistance(graph:LayoutGraph, layer:Layer, ldp:LayoutDataProvider, left:Node, right:Node):Number
TypeBasedDrawingDistanceCalculator
 Inherited
hashCode():int
YObject
  
TypeBasedDrawingDistanceCalculator
  
[static] Creates a new instance of TypeBasedDrawingDistanceCalculator
TypeBasedDrawingDistanceCalculator
Protected Methods
 MethodDefined By
  
Initializes this object.
TypeBasedDrawingDistanceCalculator
Property Detail
edge2EdgeDistanceproperty
edge2EdgeDistance:Number

Specifies the distance between edges.


Implementation
    public function get edge2EdgeDistance():Number
    public function set edge2EdgeDistance(value:Number):void
minimumFirstSegmentLengthproperty 
minimumFirstSegmentLength:Number

Specifies the minimum length of the first and last segment of an edge.


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

Specifies the distance between nodes and edges.


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

Specifies the distance between nodes.


Implementation
    public function get node2NodeDistance():Number
    public function set node2NodeDistance(value:Number):void
useCompactionproperty 
useCompaction: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 useCompaction():Boolean
    public function set useCompaction(value:Boolean):void
Constructor Detail
TypeBasedDrawingDistanceCalculator()Constructor
public function TypeBasedDrawingDistanceCalculator(init:Boolean = true)

Creates a new instance of TypeBasedDrawingDistanceCalculator

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

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

initTypeBasedDrawingDistanceCalculator()method 
protected final function initTypeBasedDrawingDistanceCalculator():void

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

See also

newTypeBasedDrawingDistanceCalculator()method 
public static function newTypeBasedDrawingDistanceCalculator():TypeBasedDrawingDistanceCalculator

Creates a new instance of TypeBasedDrawingDistanceCalculator

Returns
TypeBasedDrawingDistanceCalculator