Packagecom.yworks.yfiles.layout.grouping
Classpublic class FixedGroupLayoutStage
InheritanceFixedGroupLayoutStage Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

A layout stage for hierarchically grouped graphs. Activating this stage guarantees that a core layouter will keep the relative positions of nodes within the same group. Also, this stage is responsible for routing edges that connect nodes belonging to hierarchically unrelated groups.

More precisely, the stage temporarily replaces fixed group nodes (see FIXED_GROUP_NODES_DPKEY) with normal nodes of the same size while the groups' content is removed from the graph during layout. The nodes are used as placeholders and to keep the relations to the remaining graph elements. Edges that connect from outside the group node to its content (inter-edges) are redirected such that they connect to the node that replaces the group. After layout, the group nodes are restored and the stage inserts the content at the new group position (derived from the position of the associated node). The content itself (including the edges between content nodes) remains unchanged and is only relocated. Furthermore, the inter-edges are connected to their original source/target and the stage reroutes them using the specified inter-edge routing algorithm (see orthogonalEdgeRouter).

See also

FIXED_GROUP_NODES_DPKEY
orthogonalEdgeRouter


Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  interEdgeRoutingStyle : int
Specifies the inter-edge routing style used by this layouter.
FixedGroupLayoutStage
  orthogonalEdgeRouter : Layouter
Specifies the orthogonal edge router instance used to route the inter-edges orthogonally.
FixedGroupLayoutStage
Public Methods
 MethodDefined By
  
FixedGroupLayoutStage(init:Boolean = true)
Initializes a new instance of FixedGroupLayoutStage.
FixedGroupLayoutStage
  
canLayout(graph:LayoutGraph):Boolean
[override]
FixedGroupLayoutStage
  
doLayout(graph:LayoutGraph):void
[override]
FixedGroupLayoutStage
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
FixedGroupLayoutStage
 Inherited
hashCode():int
YObject
  
[static] Initializes a new instance of FixedGroupLayoutStage.
FixedGroupLayoutStage
  
[static] Initializes a new instance of FixedGroupLayoutStage with the given core layouter.
FixedGroupLayoutStage
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
Initializes this object.
FixedGroupLayoutStage
  
Initializes this object.
FixedGroupLayoutStage
Public Constants
 ConstantDefined By
  FIXED_GROUP_NODES_DPKEY : Object = y.layout.grouping.FixedGroupLayoutStage.FIXED_GROUP_NODES_DPKEY
[static] This key can be used to select specific group nodes whose contents should keep their relative positions.
FixedGroupLayoutStage
  INTER_EDGES_DPKEY : Object = y.layout.grouping.FixedGroupLayoutStage.INTER_EDGES_DPKEY
[static] This key is used to mark edges as inter-edges for orthogonal routing.
FixedGroupLayoutStage
  ROUTING_STYLE_ADOPT : int = 0
[static] Inter-edge routing style specifier.
FixedGroupLayoutStage
  ROUTING_STYLE_ORTHOGONAL : int = 3
[static] Inter-edge routing style specifier.
FixedGroupLayoutStage
  ROUTING_STYLE_STRAIGHTLINE : int = 4
[static] Inter-edge routing style specifier.
FixedGroupLayoutStage
Property Detail
interEdgeRoutingStyleproperty
interEdgeRoutingStyle:int

Specifies the inter-edge routing style used by this layouter.


Implementation
    public function get interEdgeRoutingStyle():int
    public function set interEdgeRoutingStyle(value:int):void
orthogonalEdgeRouterproperty 
orthogonalEdgeRouter:Layouter

Specifies the orthogonal edge router instance used to route the inter-edges orthogonally. Inter-edges that have to be routed with the specified routing algorithm will be marked using this stage's INTER_EDGES_DPKEY data provider key.


Implementation
    public function get orthogonalEdgeRouter():Layouter
    public function set orthogonalEdgeRouter(value:Layouter):void

See also

Constructor Detail
FixedGroupLayoutStage()Constructor
public function FixedGroupLayoutStage(init:Boolean = true)

Initializes a new instance of FixedGroupLayoutStage.

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
canLayout()method
override public function canLayout(graph:LayoutGraph):Boolean

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Parameters

graph:LayoutGraph

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

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

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

See also

initFixedGroupLayoutStage2()method 
protected final function initFixedGroupLayoutStage2(core:Layouter):void

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

Parameters

core:Layouter

See also

newFixedGroupLayoutStage1()method 
public static function newFixedGroupLayoutStage1():FixedGroupLayoutStage

Initializes a new instance of FixedGroupLayoutStage.

Returns
FixedGroupLayoutStage
newFixedGroupLayoutStage2()method 
public static function newFixedGroupLayoutStage2(core:Layouter):FixedGroupLayoutStage

Initializes a new instance of FixedGroupLayoutStage with the given core layouter.

Parameters

core:Layouter — the core layout algorithm for this stage.

Returns
FixedGroupLayoutStage
Constant Detail
FIXED_GROUP_NODES_DPKEYConstant
public static const FIXED_GROUP_NODES_DPKEY:Object = y.layout.grouping.FixedGroupLayoutStage.FIXED_GROUP_NODES_DPKEY

This key can be used to select specific group nodes whose contents should keep their relative positions. A group node is considered selected in this context, if the corresponding DataProvider returns true for the node or any of its ancestor (group) nodes.

Note: If there is no DataProvider for this key, all group nodes are considered selected.

INTER_EDGES_DPKEYConstant 
public static const INTER_EDGES_DPKEY:Object = y.layout.grouping.FixedGroupLayoutStage.INTER_EDGES_DPKEY

This key is used to mark edges as inter-edges for orthogonal routing. The registered data provider's getBool (com.yworks.yfiles.base.DataProvider.getBool()) method will return true for inter-edges (i.e. edges that have to be routed) and false for all other edges.

See also

ROUTING_STYLE_ADOPTConstant 
public static const ROUTING_STYLE_ADOPT:int = 0

Inter-edge routing style specifier. Adopts the edge layout from the core layouter.

ROUTING_STYLE_ORTHOGONALConstant 
public static const ROUTING_STYLE_ORTHOGONAL:int = 3

Inter-edge routing style specifier. Routes the inter-edges in an orthogonal style.

See also

ROUTING_STYLE_STRAIGHTLINEConstant 
public static const ROUTING_STYLE_STRAIGHTLINE:int = 4

Inter-edge routing style specifier. Routes the inter-edges as a straight line.