Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class MedianDrawerWrapper
InheritanceMedianDrawerWrapper Inheritance YObject Inheritance Object
Implements Drawer

This class can be used to improve the results of different drawers. It is designed as a wrapper to another drawer (especially SimplexDrawer). It will insert additional dummy nodes for each node that has an even number of incoming edges or outgoing edges. Dummy nodes will be inserted in the neighbor layer at the center of the other edges' opposite nodes.



Public Properties
 PropertyDefined By
  delegate : Drawer
Specifies the drawer to which the actual drawing will be delegated.
MedianDrawerWrapper
  drawerDelegateInternal : Drawer
[read-only]
MedianDrawerWrapper
  dummyMap : NodeMap
[write-only]
MedianDrawerWrapper
  minimalEdgeDistance : Number
[write-only]
MedianDrawerWrapper
  minimalLayerDistance : Number
[write-only]
MedianDrawerWrapper
  minimalMultiEdgeDistance : Number
[write-only]
MedianDrawerWrapper
  minimalNodeDistance : Number
[write-only]
MedianDrawerWrapper
Protected Properties
 PropertyDefined By
  drawerDelegate : Drawer
the delegate
MedianDrawerWrapper
  dummy : NodeMap
the dummyMap
MedianDrawerWrapper
Public Methods
 MethodDefined By
  
MedianDrawerWrapper(drawerDelegate:Drawer, init:Boolean = true)
Creates a new instance of MedianDrawerWrapper using the delegate to perform the core work.
MedianDrawerWrapper
  
assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void
MedianDrawerWrapper
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
MedianDrawerWrapper
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of MedianDrawerWrapper using the delegate to perform the core work.
MedianDrawerWrapper
Protected Methods
 MethodDefined By
  
initMedianDrawerWrapper(drawerDelegate:Drawer):void
Initializes this object.
MedianDrawerWrapper
  
postprocess(g:LayoutGraph, layerLists:Vector.<Object>, layerID:NodeMap):void
Called as a hook after the actual drawing is performed by the delegate
MedianDrawerWrapper
  
preprocess(g:LayoutGraph, layerLists:Vector.<Object>, layerID:NodeMap):void
Called as a hook before the actual drawing is performed by the delegate
MedianDrawerWrapper
Property Detail
delegateproperty
delegate:Drawer

Specifies the drawer to which the actual drawing will be delegated.


Implementation
    public function get delegate():Drawer
    public function set delegate(value:Drawer):void
drawerDelegateproperty 
protected var drawerDelegate:Drawer

the delegate

drawerDelegateInternalproperty 
drawerDelegateInternal:Drawer  [read-only]


Implementation
    public function get drawerDelegateInternal():Drawer
dummyproperty 
protected var dummy:NodeMap

the dummyMap

dummyMapproperty 
dummyMap:NodeMap  [write-only]


Implementation
    public function set dummyMap(value:NodeMap):void
minimalEdgeDistanceproperty 
minimalEdgeDistance:Number  [write-only]


Implementation
    public function set minimalEdgeDistance(value:Number):void
minimalLayerDistanceproperty 
minimalLayerDistance:Number  [write-only]


Implementation
    public function set minimalLayerDistance(value:Number):void
minimalMultiEdgeDistanceproperty 
minimalMultiEdgeDistance:Number  [write-only]


Implementation
    public function set minimalMultiEdgeDistance(value:Number):void
minimalNodeDistanceproperty 
minimalNodeDistance:Number  [write-only]


Implementation
    public function set minimalNodeDistance(value:Number):void
Constructor Detail
MedianDrawerWrapper()Constructor
public function MedianDrawerWrapper(drawerDelegate:Drawer, init:Boolean = true)

Creates a new instance of MedianDrawerWrapper using the delegate to perform the core work.

Parameters
drawerDelegate:Drawer
 
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
assignCoordinates()method
public function assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void

Parameters

g:LayoutGraph
 
layerLists:Vector.<Object>
 
layerID:DataProvider

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

Returns
Class
initMedianDrawerWrapper()method 
protected final function initMedianDrawerWrapper(drawerDelegate:Drawer):void

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

Parameters

drawerDelegate:Drawer

See also

newMedianDrawerWrapper()method 
public static function newMedianDrawerWrapper(drawerDelegate:Drawer):MedianDrawerWrapper

Creates a new instance of MedianDrawerWrapper using the delegate to perform the core work.

Parameters

drawerDelegate:Drawer

Returns
MedianDrawerWrapper
postprocess()method 
protected function postprocess(g:LayoutGraph, layerLists:Vector.<Object>, layerID:NodeMap):void

Called as a hook after the actual drawing is performed by the delegate

Parameters

g:LayoutGraph
 
layerLists:Vector.<Object>
 
layerID:NodeMap

preprocess()method 
protected function preprocess(g:LayoutGraph, layerLists:Vector.<Object>, layerID:NodeMap):void

Called as a hook before the actual drawing is performed by the delegate

Parameters

g:LayoutGraph
 
layerLists:Vector.<Object>
 
layerID:NodeMap