Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class AbstractDrawer
InheritanceAbstractDrawer Inheritance YObject Inheritance Object
Implements Drawer
Subclasses LinearSegmentsDrawer, MedianLinearSegmentDrawer, PendularDrawer, PolylineDrawer, SimplexDrawer, TreeDrawer

Abstract base class for the third phase of the Sugiyama algorithm. It assigns the coordinates to the nodes according to the defined ranks. It provides methods to assign the Y-Coordinates to the nodes.



Public Properties
 PropertyDefined By
  dummyMap : NodeMap
[write-only] Gives the drawer the opportunity to distinguish between dummy nodes and real ones.
AbstractDrawer
  edgeLengthKey : Object
[write-only] Set the key to the data provider, which stores the length of the edges.
AbstractDrawer
  graphInternal : LayoutGraph
[read-only]
AbstractDrawer
  minimalEdgeDistance : Number
Specifies the minimal distance between two edges in the same layer.
AbstractDrawer
  minimalLayerDistance : Number
Specifies the minimal distance between two layers.
AbstractDrawer
  minimalMultiEdgeDistance : Number
Specifies the minimal distance between two edges sharing source/target in the same layer.
AbstractDrawer
  minimalNodeDistance : Number
Specifies the minimal distance between two nodes in the same layer.
AbstractDrawer
Protected Properties
 PropertyDefined By
  distanceToNextNode : 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
  _dummyMap : NodeMap
See dummyMap
AbstractDrawer
  _edgeLengthKey : Object
The key to the data provider, which stores the length of the edges.
AbstractDrawer
  graph : LayoutGraph
The graph bound to this drawer instance.
AbstractDrawer
  _minimalEdgeDistance : Number
The minimal distance between two edges in the same layer.
AbstractDrawer
  _minimalLayerDistance : Number
The minimal distance between two layers.
AbstractDrawer
  _minimalMultiEdgeDistance : Number
The minimal distance between two edges sharing source/target in the same layer.
AbstractDrawer
  _minimalNodeDistance : Number
The minimal distance between two nodes in the same layer.
AbstractDrawer
Public Methods
 MethodDefined By
  
AbstractDrawer(init:Boolean = true)
AbstractDrawer
  
assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void
Binds the specified graph to this drawer and calls the abstract method assignFinalCoordinates()
AbstractDrawer
  
assignYCoords(graph:LayoutGraph, layerLists:Vector.<Object>):void
Assign the y coordinates to the nodes respecting the minimal layer distance.
AbstractDrawer
  
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
  
Returns the height of the bottom border of the given node.
AbstractDrawer
  
Returns the height of the border-obeying bottom half of the node,
AbstractDrawer
  
getBottomY(v:Node):Number
Returns the border obeying bottom y-coordinate of the given node.
AbstractDrawer
  
getClass():Class
[override]
AbstractDrawer
  
Returns the border obeying full height of the given node.
AbstractDrawer
  
getFullWidth(v:Node):Number
Returns the border obeying full width of the given node.
AbstractDrawer
  
Returns the width of the left border of the given node.
AbstractDrawer
  
getLeftHalf(v:Node):Number
Returns the width of the border-obeying left half of the node,
AbstractDrawer
  
getLeftX(v:Node):Number
Returns the border obeying left x-coordinate of the given node.
AbstractDrawer
  
Returns the width of the right border of the given node.
AbstractDrawer
  
getRightHalf(v:Node):Number
Returns the width of the border-obeying right half of the node,
AbstractDrawer
  
getRightX(v:Node):Number
Returns the border obeying right x-coordinate of the given node.
AbstractDrawer
  
getTopBorder(v:Node):Number
Returns the height of the top border of the given node.
AbstractDrawer
  
getTopHalf(v:Node):Number
Returns the height of the border-obeying top half of the node,
AbstractDrawer
  
getTopY(v:Node):Number
Returns the border obeying top y-coordinate of the given node.
AbstractDrawer
 Inherited
hashCode():int
YObject
Protected Methods
 MethodDefined By
  
assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void
Overwrite this method to assign the final coordinates to the objects of he graph.
AbstractDrawer
  
dispose():void
Frees allocated resources after the drawer is finished.
AbstractDrawer
  
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
  
AbstractDrawer
  
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
Property Detail
_dummyMapproperty
protected var _dummyMap:NodeMap

See dummyMap

See also

_edgeLengthKeyproperty 
protected var _edgeLengthKey:Object

The key to the data provider, which stores the length of the edges.

_minimalEdgeDistanceproperty 
protected var _minimalEdgeDistance:Number

The minimal distance between two edges in the same layer.

_minimalLayerDistanceproperty 
protected var _minimalLayerDistance:Number

The minimal distance between two layers.

_minimalMultiEdgeDistanceproperty 
protected var _minimalMultiEdgeDistance:Number

The minimal distance between two edges sharing source/target in the same layer.

_minimalNodeDistanceproperty 
protected var _minimalNodeDistance:Number

The minimal distance between two nodes in the same layer.

distanceToNextNodeproperty 
protected var distanceToNextNode: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.

dummyMapproperty 
dummyMap:NodeMap  [write-only]

Gives the drawer the opportunity to distinguish between dummy nodes and real ones. dummy stores the original edge for each dummy node or null for real nodes.


Implementation
    public function set dummyMap(value:NodeMap):void
edgeLengthKeyproperty 
edgeLengthKey:Object  [write-only]

Set the key to the data provider, which stores the length of the edges. Remark: Edges, which are split in the first phase do no longer supply lengths. This should not be to critical as they span at least two layers and are so hopefully long enough.


Implementation
    public function set edgeLengthKey(value:Object):void
graphproperty 
protected var graph:LayoutGraph

The graph bound to this drawer instance.

graphInternalproperty 
graphInternal:LayoutGraph  [read-only]


Implementation
    public function get graphInternal():LayoutGraph
minimalEdgeDistanceproperty 
minimalEdgeDistance:Number

Specifies the minimal distance between two edges in the same layer.


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

Specifies the minimal distance between two layers.


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

Specifies the minimal distance between two edges sharing source/target in the same layer.


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

Specifies the minimal distance between two nodes in the same layer.


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



Parameters
init:Boolean (default = true)
Method Detail
assignCoordinates()method
public function assignCoordinates(g:LayoutGraph, layerLists:Vector.<Object>, layerID:DataProvider):void

Binds the specified graph to this drawer and calls the abstract method assignFinalCoordinates()

Parameters

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

See also

assignFinalCoordinates()method 
protected function assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void

Overwrite this method to assign the final coordinates to the objects of he graph.

Parameters

layerLists:Vector.<Object>
 
layerID:DataProvider

assignYCoords()method 
public function assignYCoords(graph:LayoutGraph, layerLists:Vector.<Object>):void

Assign the y coordinates to the nodes respecting the minimal layer distance.

Parameters

graph:LayoutGraph
 
layerLists:Vector.<Object>

assignYCoords2()method 
public function assignYCoords2(graph:LayoutGraph, layers:Vector.<Object>):void

Assign the y coordinates to the nodes respecting the minimal layer distance.

Parameters

graph:LayoutGraph
 
layers:Vector.<Object>

dispose()method 
protected function dispose():void

Frees allocated resources after the drawer is finished.

getBottomBorder()method 
public function getBottomBorder(v:Node):Number

Returns the height of the bottom border of the given node.

Parameters

v:Node

Returns
Number
getBottomHalf()method 
public function getBottomHalf(v:Node):Number

Returns the height of the border-obeying bottom half of the node,

Parameters

v:Node

Returns
Number
getBottomY()method 
public function getBottomY(v:Node):Number

Returns the border obeying bottom y-coordinate of the given node.

Parameters

v:Node

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

Returns
Class
getDistanceToNextNode()method 
protected function getDistanceToNextNode(v:Node):Number

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. Node minimal node distances are constructed by using the values provided by the data providers that are registered with the input graph under the keys com.yworks.yfiles.layout.hierarchic.DrawerKeys.NODE_DISTANCE, com.yworks.yfiles.layout.hierarchic.DrawerKeys.NODE_BORDER_LEFT and com.yworks.yfiles.layout.hierarchic.DrawerKeys.NODE_BORDER_RIGHT.

Parameters

v:Node

Returns
Number

See also

getFullHeight()method 
public function getFullHeight(v:Node):Number

Returns the border obeying full height of the given node.

Parameters

v:Node

Returns
Number
getFullWidth()method 
public function getFullWidth(v:Node):Number

Returns the border obeying full width of the given node.

Parameters

v:Node

Returns
Number
getLeftBorder()method 
public function getLeftBorder(v:Node):Number

Returns the width of the left border of the given node.

Parameters

v:Node

Returns
Number
getLeftHalf()method 
public function getLeftHalf(v:Node):Number

Returns the width of the border-obeying left half of the node,

Parameters

v:Node

Returns
Number
getLeftX()method 
public function getLeftX(v:Node):Number

Returns the border obeying left x-coordinate of the given node.

Parameters

v:Node

Returns
Number
getRightBorder()method 
public function getRightBorder(v:Node):Number

Returns the width of the right border of the given node.

Parameters

v:Node

Returns
Number
getRightHalf()method 
public function getRightHalf(v:Node):Number

Returns the width of the border-obeying right half of the node,

Parameters

v:Node

Returns
Number
getRightX()method 
public function getRightX(v:Node):Number

Returns the border obeying right x-coordinate of the given node.

Parameters

v:Node

Returns
Number
getTopBorder()method 
public function getTopBorder(v:Node):Number

Returns the height of the top border of the given node.

Parameters

v:Node

Returns
Number
getTopHalf()method 
public function getTopHalf(v:Node):Number

Returns the height of the border-obeying top half of the node,

Parameters

v:Node

Returns
Number
getTopY()method 
public function getTopY(v:Node):Number

Returns the border obeying top y-coordinate of the given node.

Parameters

v:Node

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

initializeDistancesToNextNode()method 
protected function 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.

Parameters

layerLists:Vector.<Object>

See also

getDistanceToNextNode()
this.distanceToNextNode