| Package | com.yworks.yfiles.layout |
| Class | public class SelfLoopLayouter |
| Inheritance | SelfLoopLayouter AbstractLayoutStage YObject Object |
A core layout algorithm can be specified for this class. In that case, the performed layout process of this class is subdivided into four stages:
| Property | Defined By | ||
|---|---|---|---|
![]() | coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | |
| cornerApproximationPointsCount : int
Specifies the number of points that are used to round the corner of the selfloops. | SelfLoopLayouter | ||
| keepAllSelfloopLayouts : Boolean
Getter:
Returns whether this algorithm should keep the existing layout of all self-loops. | SelfLoopLayouter | ||
| layoutStyle : int
Specifies the layout style to be used. | SelfLoopLayouter | ||
| lineDistance : Number
Getter:
Returns the distance between two adjacent paths that run in parallel. | SelfLoopLayouter | ||
| smartSelfloopPlacement : Boolean
Whether or not smart selfloop placement should be enabled. | SelfLoopLayouter | ||
| Method | Defined By | ||
|---|---|---|---|
SelfLoopLayouter(init:Boolean = true)
Instantiates a new SelfLoopLayouter. | SelfLoopLayouter | ||
canLayout(graph:LayoutGraph):Boolean [override]
Whether or not this layouter can layout the given graph. | SelfLoopLayouter | ||
doLayout(graph:LayoutGraph):void [override]
Lays out the given graph. | SelfLoopLayouter | ||
![]() | equals(o:Object):Boolean | YObject | |
getClass():Class [override] | SelfLoopLayouter | ||
![]() | hashCode():int | YObject | |
[static]
Instantiates a new SelfLoopLayouter. | SelfLoopLayouter | ||
[static]
Instantiates a new SelfLoopLayouter. | SelfLoopLayouter | ||
| 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 | |
initSelfLoopLayouter1():void
Initializes this object. | SelfLoopLayouter | ||
initSelfLoopLayouter2(coreLayouter:Layouter):void
Initializes this object. | SelfLoopLayouter | ||
layoutSelfLoops(graph:LayoutGraph):void
Lays out the self-loops of the given graph. | SelfLoopLayouter | ||
| Constant | Defined By | ||
|---|---|---|---|
| KEEP_SELF_LOOP_LAYOUT_DPKEY : Object = y.layout.SelfLoopLayouter.KEEP_SELF_LOOP_LAYOUT_DPKEY [static]
This com.yworks.yfiles.base.DataProvider key can be used to register a com.yworks.yfiles.base.DataProvider with the graph to be laid out. | SelfLoopLayouter | ||
| STYLE_ORTHOGONAL : int = 0 [static]
Edge layout style modifier. | SelfLoopLayouter | ||
| STYLE_ROUNDED : int = 1 [static]
Edge layout style modifier. | SelfLoopLayouter | ||
| cornerApproximationPointsCount | property |
cornerApproximationPointsCount:intSpecifies the number of points that are used to round the corner of the selfloops. If this value is set to one the corners are drawn orthogonal. This value is only considered if style STYLE_ROUNDED is used.
public function get cornerApproximationPointsCount():int public function set cornerApproximationPointsCount(value:int):voidSee also
| keepAllSelfloopLayouts | property |
keepAllSelfloopLayouts:Boolean
Getter:
Returns whether this algorithm should keep the existing layout of all self-loops.
If this property is set, the KEEP_SELF_LOOP_LAYOUT_DPKEY data provider will be ignored. No layout for any self-loop will be calculated, instead the existing self-loop layout will be moved with its node. The default is false.
public function get keepAllSelfloopLayouts():Boolean public function set keepAllSelfloopLayouts(value:Boolean):voidSee also
| layoutStyle | property |
layoutStyle:intSpecifies the layout style to be used. Possible values are STYLE_ORTHOGONAL (default) and STYLE_ROUNDED.
public function get layoutStyle():int public function set layoutStyle(value:int):voidSee also
| lineDistance | property |
lineDistance:NumberGetter: Returns the distance between two adjacent paths that run in parallel.
Setter: Sets the distance between two selfloops incident to the same node. This value is only considered for layout style STYLE_ROUNDED. public function get lineDistance():Number public function set lineDistance(value:Number):voidSee also
| smartSelfloopPlacement | property |
smartSelfloopPlacement:BooleanWhether or not smart selfloop placement should be enabled. If this option is enabled, selfloops are placed on one of the four corners of the corresponding node. For the choice of the corner the algorithm considers all incident edges. Otherwise the selfloops are always placed at the upper left corner of the corresponding node.
public function get smartSelfloopPlacement():Boolean public function set smartSelfloopPlacement(value:Boolean):void| SelfLoopLayouter | () | Constructor |
public function SelfLoopLayouter(init:Boolean = true)Instantiates a new SelfLoopLayouter.
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.
|
| canLayout | () | method |
override public function canLayout(graph:LayoutGraph):BooleanWhether or not this layouter can layout the given graph. Returns true if the core layouter can handle the given graph after all of its self-loops (reflexive) edges have been hidden.
Parameters
graph:LayoutGraph |
Boolean |
| doLayout | () | method |
override public function doLayout(graph:LayoutGraph):voidLays out the given graph.
Parameters
graph:LayoutGraph |
| getClass | () | method |
override public function getClass():ClassReturnsClass |
| initSelfLoopLayouter1 | () | method |
protected final function initSelfLoopLayouter1():void
Initializes this object. See the documentation of the corresponding factory method newSelfLoopLayouter1() for details.
See also
| initSelfLoopLayouter2 | () | method |
protected final function initSelfLoopLayouter2(coreLayouter:Layouter):void
Initializes this object. See the documentation of the corresponding factory method newSelfLoopLayouter2() for details.
Parameters
coreLayouter:Layouter |
See also
| layoutSelfLoops | () | method |
protected function layoutSelfLoops(graph:LayoutGraph):voidLays out the self-loops of the given graph. This method will be called after the core layouter has laid out the graph and all self-loops have been reinserted in the graph again.
Parameters
graph:LayoutGraph |
| newSelfLoopLayouter1 | () | method |
public static function newSelfLoopLayouter1():SelfLoopLayouterInstantiates a new SelfLoopLayouter.
ReturnsSelfLoopLayouter |
| newSelfLoopLayouter2 | () | method |
public static function newSelfLoopLayouter2(coreLayouter:Layouter):SelfLoopLayouterInstantiates a new SelfLoopLayouter. The core layout routine will be delegated to the given layouter.
Parameters
coreLayouter:Layouter |
SelfLoopLayouter |
| KEEP_SELF_LOOP_LAYOUT_DPKEY | Constant |
public static const KEEP_SELF_LOOP_LAYOUT_DPKEY:Object = y.layout.SelfLoopLayouter.KEEP_SELF_LOOP_LAYOUT_DPKEY
This com.yworks.yfiles.base.DataProvider key can be used to register a com.yworks.yfiles.base.DataProvider with the graph to be laid out.
This algorithm will query for each self-loop the boolean value from the data provider to determine whether the current layout of the self-loop should be kept. I.e., if the DataProvider instance obtained from the graph using this key returns true for a self-loop, that self-loop will not be laid out by this stage but the bends will be moved by that stage according to the movement of their node.
See also
| STYLE_ORTHOGONAL | Constant |
public static const STYLE_ORTHOGONAL:int = 0Edge layout style modifier. Using this style, selfloops are routed in an orthogonal fashion, i.e., the route consists of an alternating sequence of horizontal and vertical line segments. This style can be set with method layoutStyle.
See also
| STYLE_ROUNDED | Constant |
public static const STYLE_ROUNDED:int = 1Edge layout style modifier. Using this style, the routes of selfloops are rounded. This style can be set with method layoutStyle.
See also