Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class SimplexDrawer
InheritanceSimplexDrawer Inheritance AbstractDrawer Inheritance YObject Inheritance Object

Drawer based on rank-assignment. The drawer works only with integer values and rounds double values to integers.



Public Properties
 PropertyDefined By
 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
  maximalDuration : uint
Getter: Returns the time limit (in milliseconds) set for the algorithm.
SimplexDrawer
 InheritedminimalEdgeDistance : Number
Specifies the minimal distance between two edges in the same layer.
AbstractDrawer
 InheritedminimalLayerDistance : Number
Specifies the minimal distance between two layers.
AbstractDrawer
 InheritedminimalMultiEdgeDistance : Number
Specifies the minimal distance between two edges sharing source/target in the same layer.
AbstractDrawer
 InheritedminimalNodeDistance : Number
Specifies the minimal distance between two nodes in the same layer.
AbstractDrawer
  straighteningFactor : int
Specifies the straightening factor.
SimplexDrawer
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
  
SimplexDrawer(init:Boolean = true)
SimplexDrawer
 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]
SimplexDrawer
 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]
SimplexDrawer
Protected Methods
 MethodDefined By
  
assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void
[override] Assigns the coordinates to the nodes based on simplex-rank assignment.
SimplexDrawer
 Inherited
dispose():void
Frees allocated resources after the drawer is finished.
AbstractDrawer
  
getCost(graph:Graph, result:NodeMap, weight:EdgeMap, minLength:EdgeMap):int
Returns the overall edge cost of the result.
SimplexDrawer
 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
  
SimplexDrawer
  
isDummy(graph:LayoutGraph, node:Node):Boolean
[static] Returns whether the given node is a dummy node.
SimplexDrawer
Property Detail
maximalDurationproperty
maximalDuration:uint

Getter: Returns the time limit (in milliseconds) set for the algorithm.

Setter: Sets a preferred time limit (in milliseconds) for the algorithm. Note that restricting the maximal duration may result in a worse layout quality. Furthermore, the real runtime may exceed the maximal duration since the algorithm still have to find a valid solution.


Implementation
    public function get maximalDuration():uint
    public function set maximalDuration(value:uint):void
straighteningFactorproperty 
straighteningFactor:int

Specifies the straightening factor. Higher values will result in longer straight line routings.


Implementation
    public function get straighteningFactor():int
    public function set straighteningFactor(value:int):void
Constructor Detail
SimplexDrawer()Constructor
public function SimplexDrawer(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
assignFinalCoordinates()method
override protected function assignFinalCoordinates(layerLists:Vector.<Object>, layerID:DataProvider):void

Assigns the coordinates to the nodes based on simplex-rank assignment.

Parameters

layerLists:Vector.<Object> — The nodes in each layer.
 
layerID:DataProvider — Provides the layer ID for nodes.

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

Returns
Class
getCost()method 
protected function getCost(graph:Graph, result:NodeMap, weight:EdgeMap, minLength:EdgeMap):int

Returns the overall edge cost of the result.

Parameters

graph:Graph
 
result:NodeMap — The result to calculate the cost for.
 
weight:EdgeMap — Provides the edge weights.
 
minLength:EdgeMap — Provides the min length for edges.

Returns
int — The total cost given the parameters.
initSimplexDrawer()method 
protected final function initSimplexDrawer():void

isDummy()method 
protected static function isDummy(graph:LayoutGraph, node:Node):Boolean

Returns whether the given node is a dummy node.

Parameters

graph:LayoutGraph
 
node:Node

Returns
Boolean
newSimplexDrawer()method 
public static function newSimplexDrawer():SimplexDrawer

Returns
SimplexDrawer