Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class TreeDrawer
InheritanceTreeDrawer Inheritance AbstractDrawer Inheritance YObject Inheritance Object

This class implements the third phase of the hierarchic layout algorithm for trees. If the input graph is not a tree, an alternative drawer is invoked.



Public Properties
 PropertyDefined By
  alternativeDrawer : Drawer
[write-only] Sets the drawer, which is called when graph is not a tree.
TreeDrawer
 InheriteddummyMap : NodeMap
[write-only] Gives the drawer the opportunity to distinguish between dummy nodes and real ones.
AbstractDrawer
 InheritededgeLengthKey : Object
[write-only] Set the key to the data provider, which stores the length of the edges.
AbstractDrawer
 InheritedgraphInternal : LayoutGraph
[read-only]
AbstractDrawer
  minimalEdgeDistance : Number
[override]
TreeDrawer
  minimalLayerDistance : Number
[override]
TreeDrawer
  minimalMultiEdgeDistance : Number
[override]
TreeDrawer
  minimalNodeDistance : Number
[override]
TreeDrawer
Protected Properties
 PropertyDefined By
 InheriteddistanceToNextNode : NodeMap
Stores the minimal distance between the right border of a node and the left border of its right hand side neighbor in a layer.
AbstractDrawer
 Inherited_dummyMap : NodeMap
See dummyMap
AbstractDrawer
 Inherited_edgeLengthKey : Object
The key to the data provider, which stores the length of the edges.
AbstractDrawer
 Inheritedgraph : LayoutGraph
The graph bound to this drawer instance.
AbstractDrawer
 Inherited_minimalEdgeDistance : Number
The minimal distance between two edges in the same layer.
AbstractDrawer
 Inherited_minimalLayerDistance : Number
The minimal distance between two layers.
AbstractDrawer
 Inherited_minimalMultiEdgeDistance : Number
The minimal distance between two edges sharing source/target in the same layer.
AbstractDrawer
 Inherited_minimalNodeDistance : Number
The minimal distance between two nodes in the same layer.
AbstractDrawer
Public Methods
 MethodDefined By
  
TreeDrawer(init:Boolean = true)
TreeDrawer
 Inherited
assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void
Binds the specified graph to this drawer and calls the abstract method assignFinalCoordinates()
AbstractDrawer
 Inherited
assignYCoords(graph:LayoutGraph, layerLists:Vector.<Object>):void
Assign the y coordinates to the nodes respecting the minimal layer distance.
AbstractDrawer
 Inherited
assignYCoords2(graph:LayoutGraph, layers:Vector.<Object>):void
Assign the y coordinates to the nodes respecting the minimal layer distance.
AbstractDrawer
 Inherited
equals(o:Object):Boolean
YObject
 Inherited
Returns the height of the bottom border of the given node.
AbstractDrawer
 Inherited
Returns the height of the border-obeying bottom half of the node,
AbstractDrawer
 Inherited
getBottomY(v:Node):Number
Returns the border obeying bottom y-coordinate of the given node.
AbstractDrawer
  
getClass():Class
[override]
TreeDrawer
 Inherited
Returns the border obeying full height of the given node.
AbstractDrawer
 Inherited
getFullWidth(v:Node):Number
Returns the border obeying full width of the given node.
AbstractDrawer
 Inherited
Returns the width of the left border of the given node.
AbstractDrawer
 Inherited
getLeftHalf(v:Node):Number
Returns the width of the border-obeying left half of the node,
AbstractDrawer
 Inherited
getLeftX(v:Node):Number
Returns the border obeying left x-coordinate of the given node.
AbstractDrawer
 Inherited
Returns the width of the right border of the given node.
AbstractDrawer
 Inherited
getRightHalf(v:Node):Number
Returns the width of the border-obeying right half of the node,
AbstractDrawer
 Inherited
getRightX(v:Node):Number
Returns the border obeying right x-coordinate of the given node.
AbstractDrawer
 Inherited
getTopBorder(v:Node):Number
Returns the height of the top border of the given node.
AbstractDrawer
 Inherited
getTopHalf(v:Node):Number
Returns the height of the border-obeying top half of the node,
AbstractDrawer
 Inherited
getTopY(v:Node):Number
Returns the border obeying top y-coordinate of the given node.
AbstractDrawer
 Inherited
hashCode():int
YObject
  
[static]
TreeDrawer
Protected Methods
 MethodDefined By
  
assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void
[override]
TreeDrawer
 Inherited
dispose():void
Frees allocated resources after the drawer is finished.
AbstractDrawer
 Inherited
Returns the minimal distance between the right border of the given node and the left border of its right hand side neighbor in the layer.
AbstractDrawer
 Inherited
AbstractDrawer
 Inherited
initializeDistancesToNextNode(layerLists:Vector.<Object>):void
Initializes the minimal distances between the right border of a node and the left border of its right hand side neighbor in a layer.
AbstractDrawer
  
Initializes this object.
TreeDrawer
Property Detail
alternativeDrawerproperty
alternativeDrawer:Drawer  [write-only]

Sets the drawer, which is called when graph is not a tree.


Implementation
    public function set alternativeDrawer(value:Drawer):void
minimalEdgeDistanceproperty 
minimalEdgeDistance:Number[override]


Implementation
    public function get minimalEdgeDistance():Number
    public function set minimalEdgeDistance(value:Number):void
minimalLayerDistanceproperty 
minimalLayerDistance:Number[override]


Implementation
    public function get minimalLayerDistance():Number
    public function set minimalLayerDistance(value:Number):void
minimalMultiEdgeDistanceproperty 
minimalMultiEdgeDistance:Number[override]


Implementation
    public function get minimalMultiEdgeDistance():Number
    public function set minimalMultiEdgeDistance(value:Number):void
minimalNodeDistanceproperty 
minimalNodeDistance:Number[override]


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

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
assignFinalCoordinates()method
override protected function assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void

Parameters

layerLists:Vector.<Object>
 
layerID:DataProvider

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

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

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

See also

newTreeDrawer()method 
public static function newTreeDrawer():TreeDrawer

Returns
TreeDrawer