Package | com.yworks.yfiles.layout |
Class | public class PortCalculator |
Inheritance | PortCalculator AbstractLayoutStage YObject Object |
Implements | LayoutStage |
LayoutGraph
instance the DataProvider
s are queried for an implementation of the com.yworks.yfiles.layout.IntersectionCalculator interface. If the result is non-null
, that implementation will be queried and if the result of the query is non-null
, the returned point will be applied to the edge layout. For this layout stage to work use com.yworks.yfiles.layout.CompositeLayoutStage.prependStage() or com.yworks.yfiles.layout.CanonicMultiStageLayouter.prependStage() to add this layout stage and register appropriate com.yworks.yfiles.base.DataProvider implementations to the graph using the keys defined in com.yworks.yfiles.layout.IntersectionCalculator. Note, that this class will not change the coordinates of a port if it is associated with a strong port constraint.
See also
Property | Defined By | ||
---|---|---|---|
EPS : Number
EPSILON used by equalsEps(). | PortCalculator |
Method | Defined By | ||
---|---|---|---|
PortCalculator(init:Boolean = true)
Creates a new PortCalculator without a core layouter. | PortCalculator | ||
canLayout(graph:LayoutGraph):Boolean [override] | PortCalculator | ||
doLayout(graph:LayoutGraph):void [override] | PortCalculator | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | PortCalculator | ||
hashCode():int | YObject | ||
[static]
Creates a new PortCalculator without a core layouter. | PortCalculator | ||
[static]
Creates a new PortCalculator using the given layouter as the core of this layout stage. | PortCalculator |
Method | Defined By | ||
---|---|---|---|
calculatePorts(graph:LayoutGraph):void
Performs the actual port calculation on the specified graph instance. | PortCalculator | ||
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 | ||
equalsEps(x1:Number, y1:Number, x2:Number, y2:Number):Boolean
Callback method that determines whether two points are equal. | PortCalculator | ||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
initPortCalculator1():void
Initializes this object. | PortCalculator | ||
initPortCalculator2(core:Layouter):void
Initializes this object. | PortCalculator |
EPS | property |
PortCalculator | () | Constructor |
public function PortCalculator(init:Boolean = true)
Creates a new PortCalculator without a core layouter.
Parametersinit: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.
|
calculatePorts | () | method |
protected function calculatePorts(graph:LayoutGraph):void
Performs the actual port calculation on the specified graph instance.
Parameters
graph:LayoutGraph |
canLayout | () | method |
override public function canLayout(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
doLayout | () | method |
equalsEps | () | method |
protected function equalsEps(x1:Number, y1:Number, x2:Number, y2:Number):Boolean
Callback method that determines whether two points are equal.
Parameters
x1:Number | |
y1:Number | |
x2:Number | |
y2:Number |
Boolean |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initPortCalculator1 | () | method |
protected final function initPortCalculator1():void
Initializes this object. See the documentation of the corresponding factory method newPortCalculator1()
for details.
See also
initPortCalculator2 | () | method |
protected final function initPortCalculator2(core:Layouter):void
Initializes this object. See the documentation of the corresponding factory method newPortCalculator2()
for details.
Parameters
core:Layouter |
See also
newPortCalculator1 | () | method |
public static function newPortCalculator1():PortCalculator
Creates a new PortCalculator without a core layouter.
ReturnsPortCalculator |
newPortCalculator2 | () | method |
public static function newPortCalculator2(core:Layouter):PortCalculator
Creates a new PortCalculator using the given layouter as the core of this layout stage.
Parameters
core:Layouter |
PortCalculator |