Packagecom.yworks.yfiles.layout
Classpublic class PortConstraintConfigurator
InheritancePortConstraintConfigurator Inheritance YObject Inheritance Object

Provides configuration services for the port constraints of a graph.



Public Methods
 MethodDefined By
  
PortConstraintConfigurator(init:Boolean = true)
Creates a new instance of PortConstraintConfigurator
PortConstraintConfigurator
  
createPortConstraintFromSketch(graph:LayoutGraph, e:Edge, source:Boolean, strong:Boolean):PortConstraint
Creates and returns a port constraint for the given edge.
PortConstraintConfigurator
  
createPortConstraintsFromSketch(graph:LayoutGraph, ec:EdgeCursor, spcMap:EdgeMap, strongSP:Boolean, tpcMap:EdgeMap, strongTP:Boolean):void
Creates port constraints for some edges of the given graph.
PortConstraintConfigurator
  
Creates weak port constraints for all edges of the given graph.
PortConstraintConfigurator
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PortConstraintConfigurator
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of PortConstraintConfigurator
PortConstraintConfigurator
Protected Methods
 MethodDefined By
  
Initializes this object.
PortConstraintConfigurator
Constructor Detail
PortConstraintConfigurator()Constructor
public function PortConstraintConfigurator(init:Boolean = true)

Creates a new instance of PortConstraintConfigurator

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
createPortConstraintFromSketch()method
public function createPortConstraintFromSketch(graph:LayoutGraph, e:Edge, source:Boolean, strong:Boolean):PortConstraint

Creates and returns a port constraint for the given edge. The side constraint is setup according to the current drawing of the edge.

Parameters

graph:LayoutGraph
 
e:Edge
 
source:Boolean — if true a source port constraint for the given edge will be created, otherwise a target port constraint.
 
strong:Boolean — if true a strong port constraint is created, otherwise a weak port constraint is created.

Returns
PortConstraint
createPortConstraintsFromSketch()method 
public function createPortConstraintsFromSketch(graph:LayoutGraph, ec:EdgeCursor, spcMap:EdgeMap, strongSP:Boolean, tpcMap:EdgeMap, strongTP:Boolean):void

Creates port constraints for some edges of the given graph.

Parameters

graph:LayoutGraph
 
ec:EdgeCursor — EdgeCursor that provides access to the edges for which to set port constraints.
 
spcMap:EdgeMap — an edge map that will be used to store the source port constraints of the edges.
 
strongSP:Boolean — whether or not to assign strong source port constraints
 
tpcMap:EdgeMap — an edge map that will be used to store the target port constraints of the edges.
 
strongTP:Boolean — whether or not to assign strong target port constraints

createWeakPortConstraintsFromSketch()method 
public function createWeakPortConstraintsFromSketch(graph:LayoutGraph, spcMap:EdgeMap, tpcMap:EdgeMap):void

Creates weak port constraints for all edges of the given graph.

Parameters

graph:LayoutGraph
 
spcMap:EdgeMap — an edge map that will be used to store the source port constraints of the edges.
 
tpcMap:EdgeMap — an edge map that will be used to store the target port constraints of the edges.

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

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

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

See also

newPortConstraintConfigurator()method 
public static function newPortConstraintConfigurator():PortConstraintConfigurator

Creates a new instance of PortConstraintConfigurator

Returns
PortConstraintConfigurator