Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class AlignmentDrawer
InheritanceAlignmentDrawer Inheritance YObject Inheritance Object
Implements Drawer

This class can be used to simply wrap another Drawer implementation. It will rearrange nodes within each layer so that they are aligned with respect to a given alignment point, that is provided on a per node basis, which is provided by a registered DataProvider instance that may provide doubles that are interpreted as relative coordinates to the center of the node.



Public Properties
 PropertyDefined By
  dummyMap : NodeMap
[write-only]
AlignmentDrawer
  minimalEdgeDistance : Number
[write-only]
AlignmentDrawer
  minimalLayerDistance : Number
[write-only]
AlignmentDrawer
  minimalMultiEdgeDistance : Number
[write-only]
AlignmentDrawer
  minimalNodeDistance : Number
[write-only]
AlignmentDrawer
Public Methods
 MethodDefined By
  
AlignmentDrawer(inner:Drawer, init:Boolean = true)
Creates a new AlignmentDrawer using the given drawer as the actual drawer
AlignmentDrawer
  
assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void
AlignmentDrawer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
AlignmentDrawer
 Inherited
hashCode():int
YObject
  
[static] Creates a new AlignmentDrawer using the given drawer as the actual drawer
AlignmentDrawer
Protected Methods
 MethodDefined By
  
alignNodes(graph:LayoutGraph, lists:Vector.<Object>):void
Modifies the given drawing by modifying the y-coordinates only
AlignmentDrawer
  
Initializes this object.
AlignmentDrawer
Public Constants
 ConstantDefined By
  NODE_ALIGNMENT_POINT_DPKEY : Object = y.layout.hierarchic.AlignmentDrawer.NODE_ALIGNMENT_POINT_DPKEY
[static] The DataProvider key used for the DataProvider instance that provides for each node a double depicting the center anchored offset to the alignment point.
AlignmentDrawer
Property Detail
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
AlignmentDrawer()Constructor
public function AlignmentDrawer(inner:Drawer, init:Boolean = true)

Creates a new AlignmentDrawer using the given drawer as the actual drawer

Parameters
inner: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
alignNodes()method
protected function alignNodes(graph:LayoutGraph, lists:Vector.<Object>):void

Modifies the given drawing by modifying the y-coordinates only

Parameters

graph:LayoutGraph
 
lists:Vector.<Object>

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
initAlignmentDrawer()method 
protected final function initAlignmentDrawer(inner:Drawer):void

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

Parameters

inner:Drawer

See also

newAlignmentDrawer()method 
public static function newAlignmentDrawer(inner:Drawer):AlignmentDrawer

Creates a new AlignmentDrawer using the given drawer as the actual drawer

Parameters

inner:Drawer

Returns
AlignmentDrawer
Constant Detail
NODE_ALIGNMENT_POINT_DPKEYConstant
public static const NODE_ALIGNMENT_POINT_DPKEY:Object = y.layout.hierarchic.AlignmentDrawer.NODE_ALIGNMENT_POINT_DPKEY

The DataProvider key used for the DataProvider instance that provides for each node a double depicting the center anchored offset to the alignment point.