Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class PortAssignment
InheritancePortAssignment Inheritance YObject Inheritance Object

This class assigns port coordinates to the edges of a graph.



Public Methods
 MethodDefined By
  
PortAssignment(init:Boolean = true)
PortAssignment
  
assignPorts(g:LayoutGraph, layers:Vector.<Object>, dummyMark:DataProvider):void
[static] Assigns port coordinates to the edges.
PortAssignment
  
[static] Assigns port coordinates to the edges.
PortAssignment
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PortAssignment
 Inherited
hashCode():int
YObject
  
[static]
PortAssignment
Protected Methods
 MethodDefined By
  
PortAssignment
Constructor Detail
PortAssignment()Constructor
public function PortAssignment(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
assignPorts()method
public static function assignPorts(g:LayoutGraph, layers:Vector.<Object>, dummyMark:DataProvider):void

Assigns port coordinates to the edges. It is assumed that all incoming edges of a node connect at the top side of that node and that all outgoing edges of a node leave at the bottom side of that node. Port assignment will be such that the ports will be spread evenly at top and bottom sides of the nodes. Ports will be assigned such that no unnecessary edge crossings will be introduced.

Parameters

g:LayoutGraph — graph whose edges need port assignment
 
layers:Vector.<Object> — the layering of g
 
dummyMark:DataProvider — provides boolean data about whether a node is a dummy node or not.

assignPortsWithOrdering()method 
public static function assignPortsWithOrdering(g:LayoutGraph, dummyMark:DataProvider, inComp:Comparator, outComp:Comparator):void

Assigns port coordinates to the edges. It is assumed that all incoming edges of a node connect at the top side of that node and that all outgoing edges of a node leave at the bottom side of that node. Port assignment will be such that the ports will be spread evenly at top and bottom sides of the nodes. Ports will be assigned according to the given Comparators.

Parameters

g:LayoutGraph — graph whose edges need port assignment
 
dummyMark:DataProvider — provides boolean data about whether a node is a dummy node or not.
 
inComp:Comparator — A Comparator that defines an ordering for edges. This comparator is used for ordering the edges entering a node.
 
outComp:Comparator — A Comparator that defines an ordering for edges. This comparator is used for ordering the edges leaving a node

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

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

newPortAssignment()method 
public static function newPortAssignment():PortAssignment

Returns
PortAssignment