Package | com.yworks.yfiles.layout |
Class | public class PortCandidateAssignmentStage |
Inheritance | PortCandidateAssignmentStage AbstractLayoutStage YObject Object |
If PortCandidate
s are assigned for edges and nodes, this stage tries to match them. When there is no match, the PortCandidate
with the lowest costs specified for the edge is chosen. While PortConstraint
s are also matched to PortCandidate
s at nodes and edges, it is not recommended to mix them because they belong to different concepts.
Furthermore, option pathCorrection allows to specify whether the edge path should be corrected after correcting a port.
See also
Property | Defined By | ||
---|---|---|---|
coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | ||
pathCorrection : Boolean
Specifies whether or not this stage corrects the edge paths after moving the port to the location specified by a com.yworks.yfiles.layout.PortConstraint or com.yworks.yfiles.layout.PortCandidate s. | PortCandidateAssignmentStage |
Method | Defined By | ||
---|---|---|---|
PortCandidateAssignmentStage(init:Boolean = true) | PortCandidateAssignmentStage | ||
canLayout(graph:LayoutGraph):Boolean [override] | PortCandidateAssignmentStage | ||
doLayout(graph:LayoutGraph):void [override] | PortCandidateAssignmentStage | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | PortCandidateAssignmentStage | ||
hashCode():int | YObject | ||
[static] | PortCandidateAssignmentStage | ||
[static] | PortCandidateAssignmentStage |
Method | Defined By | ||
---|---|---|---|
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out. | AbstractLayoutStage | ||
doLayoutCore(graph:LayoutGraph):void
Invokes the layout routine of the core layouter. | AbstractLayoutStage | ||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
Initializes this object. | PortCandidateAssignmentStage | ||
initPortCandidateAssignmentStage2(core:Layouter):void
Initializes this object. | PortCandidateAssignmentStage |
pathCorrection | property |
pathCorrection:Boolean
Specifies whether or not this stage corrects the edge paths after moving the port to the location specified by a com.yworks.yfiles.layout.PortConstraint or com.yworks.yfiles.layout.PortCandidate s.
If path correction is enabled, the edge will be rerouted within a specific area around its source/target node. Outside this area it will keep the route that was calculated by the core layouter (coreLayouter). When disabled, only the ports are moved which may be more suitable for initially straight edges.
Note that the path correction uses a simple orthogonal routing strategy that is fast but may produce overlapping edge segments as well as edge-node intersections.
By default this option is disabled.
public function get pathCorrection():Boolean
public function set pathCorrection(value:Boolean):void
See also
PortCandidateAssignmentStage | () | Constructor |
public function PortCandidateAssignmentStage(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.
|
canLayout | () | method |
override public function canLayout(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
doLayout | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initPortCandidateAssignmentStage1 | () | method |
protected final function initPortCandidateAssignmentStage1():void
Initializes this object. See the documentation of the corresponding factory method newPortCandidateAssignmentStage1()
for details.
See also
initPortCandidateAssignmentStage2 | () | method |
protected final function initPortCandidateAssignmentStage2(core:Layouter):void
Initializes this object. See the documentation of the corresponding factory method newPortCandidateAssignmentStage2()
for details.
Parameters
core:Layouter |
See also
newPortCandidateAssignmentStage1 | () | method |
public static function newPortCandidateAssignmentStage1():PortCandidateAssignmentStage
ReturnsPortCandidateAssignmentStage |
newPortCandidateAssignmentStage2 | () | method |
public static function newPortCandidateAssignmentStage2(core:Layouter):PortCandidateAssignmentStage
Parameters
core:Layouter |
PortCandidateAssignmentStage |