Packagecom.yworks.yfiles.layout.circular
Classpublic class CircularLayouter
InheritanceCircularLayouter Inheritance CanonicMultiStageLayouter Inheritance YObject Inheritance Object

Circular style layouter. This layouter either places all nodes on or inside a circle or partitions the graph in disjoint node sets each of which will be laid out separately. The exact behavior for the layout of these partitions can be controlled via partitionLayoutStyle . The partition policy can be set with layoutStyle. The separate partitions themselves are arranged using a com.yworks.yfiles.layout.tree.BalloonLayouter.

Here is a sample output of the layouter using BCC_COMPACT as partition policy and PARTITION_LAYOUTSTYLE_CYCLIC as layout style for the partitions.

See also

partitionLayoutStyle
layoutStyle
com.yworks.yfiles.layout.tree.BalloonLayouter
BCC_COMPACT
PARTITION_LAYOUTSTYLE_CYCLIC


Public Properties
 PropertyDefined By
  balloonLayouter : BalloonLayouter
[read-only] Returns the BalloonLayouter used for arranging the partitions Configuring that layouter has effect upon the partition arrangement within the overall layout.
CircularLayouter
 InheritedcomponentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph.
CanonicMultiStageLayouter
 InheritedcomponentLayouterEnabled : Boolean
Getter: Returns whether or not ComponentLayouter is enabled.
CanonicMultiStageLayouter
  considerNodeLabels : Boolean
Specifies whether or not node labels are taken into account when calculating node positions (thereby preventing possible node/node label or node label/node label overlaps).
CircularLayouter
  fromSketchMode : Boolean
Determines whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.
CircularLayouter
 InheritedgroupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm.
CanonicMultiStageLayouter
 InheritedhideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins.
CanonicMultiStageLayouter
 InheritedlabelLayouter : LayoutStage
Getter: Returns the algorithm used for placing labels.
CanonicMultiStageLayouter
 InheritedlabelLayouterEnabled : Boolean
Getter: Returns whether or not LabelLayouter is enabled.
CanonicMultiStageLayouter
 InheritedlayoutOrientation : int
Specifies the main layout orientation.
CanonicMultiStageLayouter
  layoutStyle : int
Specifies the global layout style for this layouter.
CircularLayouter
  maximalDeviationAngle : int
Specifies the maximal deviation angle allowed for an edge.
CircularLayouter
 InheritedorientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout.
CanonicMultiStageLayouter
 InheritedorientationLayouterEnabled : Boolean
Getter: Returns whether or not the OrientationLayouter is enabled.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouter : LayoutStage
Getter: Returns the LayoutStage responsible for routing parallel edges.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouterEnabled : Boolean
Getter: Returns whether or not the ParallelEdgeLayouter is enabled.
CanonicMultiStageLayouter
  partitionLayoutStyle : int
Specifies the layout style for the arrangement of each partition.
CircularLayouter
  placeChildrenOnCommonRadius : Boolean
Getter: Returns whether or not, in the underlying tree, the children of a node are placed on a common radius.
CircularLayouter
 InheritedselfLoopLayouter : LayoutStage
Getter: Returns the LayoutStage used for routing Self-loops.
CanonicMultiStageLayouter
 InheritedselfLoopLayouterEnabled : Boolean
Getter: Returns whether or not the SelfLoopLayouter is enabled.
CanonicMultiStageLayouter
  singleCycleLayouter : SingleCycleLayouter
[read-only] Returns the SingleCycleLayouter used for laying out single node cycles Configuring that layouter has effects upon single cycle layouts
CircularLayouter
 InheritedsubgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph.
CanonicMultiStageLayouter
 InheritedsubgraphLayouterEnabled : Boolean
Getter: Returns whether or not the SubgraphLayouter is enabled.
CanonicMultiStageLayouter
Public Methods
 MethodDefined By
  
CircularLayouter(init:Boolean = true)
Create a new instance of this layouter.
CircularLayouter
 Inherited
Appends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given layout graph.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given graph interface and layout.
CanonicMultiStageLayouter
 Inherited
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter.
CanonicMultiStageLayouter
  
canLayoutCore(graph:LayoutGraph):Boolean
[override] Always returns true.
CircularLayouter
  
doLayout(layoutGraph:LayoutGraph):void
[override] Calculates a layout for the given graph.
CircularLayouter
 Inherited
Calculates a layout for the given graph interface and layout.
CanonicMultiStageLayouter
  
[override] Core layout routine.
CircularLayouter
 Inherited
Disables all layout stages and performs only the core layouter.
CanonicMultiStageLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
CircularLayouter
 Inherited
hashCode():int
YObject
  
[static] Create a new instance of this layouter.
CircularLayouter
 Inherited
Prepends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage().
CanonicMultiStageLayouter
Protected Methods
 MethodDefined By
 Inherited
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero.
CanonicMultiStageLayouter
 Inherited
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero.
CanonicMultiStageLayouter
 Inherited
CanonicMultiStageLayouter
  
Initializes this object.
CircularLayouter
Public Constants
 ConstantDefined By
  BCC_COMPACT : int = 0
[static] Layout style specifier.
CircularLayouter
  BCC_ISOLATED : int = 1
[static] Layout style specifier.
CircularLayouter
  CIRCLE_ID_HOLDER_DPKEY : Object = y.layout.circular.CircularLayouter.CIRCLE_ID_HOLDER_DPKEY
[static] Used for publishing the final circle information.
CircularLayouter
  CIRCULAR_CUSTOM_GROUPS : int = 2
[static] Layout style specifier.
CircularLayouter
  CIRCULAR_CUSTOM_GROUPS_DPKEY : Object = y.layout.circular.CircularLayouter.CIRCULAR_CUSTOM_GROUPS_DPKEY
[static] This key is used to identify custom groups.
CircularLayouter
  PARTITION_LAYOUTSTYLE_CYCLIC : int = 0
[static] Place each node of a partition on the boundary of a circle.
CircularLayouter
  PARTITION_LAYOUTSTYLE_DISK : int = 1
[static] Create semi-compact layout for each partition.
CircularLayouter
  PARTITION_LAYOUTSTYLE_ORGANIC : int = 2
[static] Create most compact layout for each partition.
CircularLayouter
  SINGLE_CYCLE : int = 3
[static] Layout style specifier.
CircularLayouter
Property Detail
balloonLayouterproperty
balloonLayouter:BalloonLayouter  [read-only]

Returns the BalloonLayouter used for arranging the partitions

Configuring that layouter has effect upon the partition arrangement within the overall layout.


Implementation
    public function get balloonLayouter():BalloonLayouter
considerNodeLabelsproperty 
considerNodeLabels:Boolean

Specifies whether or not node labels are taken into account when calculating node positions (thereby preventing possible node/node label or node label/node label overlaps).

Note that this option only works correctly if the layout orientation (layoutOrientation) is set to com.yworks.yfiles.layout.LayoutOrientation.TOP_TO_BOTTOM (which is the default). Changing the layout orientation for an undirected layout algorithm like the com.yworks.yfiles.layout.circular.CircularLayouter doesn't make sense.


Implementation
    public function get considerNodeLabels():Boolean
    public function set considerNodeLabels(value:Boolean):void

See also

fromSketchModeproperty 
fromSketchMode:Boolean

Determines whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.

If enabled: Switching between different partition policies or group layout styles can lead to unexpected results.

By default this feature is disabled.


Implementation
    public function get fromSketchMode():Boolean
    public function set fromSketchMode(value:Boolean):void

See also

layoutStyleproperty 
layoutStyle:int

Specifies the global layout style for this layouter. Allowed layout styles are SINGLE_CYCLE, BCC_ISOLATED, BCC_COMPACT and CIRCULAR_CUSTOM_GROUPS

By default BCC_COMPACT is used as layout style


Implementation
    public function get layoutStyle():int
    public function set layoutStyle(value:int):void

See also

maximalDeviationAngleproperty 
maximalDeviationAngle:int

Specifies the maximal deviation angle allowed for an edge. The deviation angle for an edge is the difference between its optimal radiation angle away from the parent cycle and its actual radiation angle.

By default a maximal deviation angle of 90 degrees is applied.

Note that using a small maximal deviation angle may significantly increase the length of edges. The same is true for small preferred child wedges set on the used BalloonLayouter instance, see method balloonLayouter.


Implementation
    public function get maximalDeviationAngle():int
    public function set maximalDeviationAngle(value:int):void

See also

partitionLayoutStyleproperty 
partitionLayoutStyle:int

Specifies the layout style for the arrangement of each partition.

Default is PARTITION_LAYOUTSTYLE_CYCLIC


Implementation
    public function get partitionLayoutStyle():int
    public function set partitionLayoutStyle(value:int):void

See also

placeChildrenOnCommonRadiusproperty 
placeChildrenOnCommonRadius:Boolean

Getter: Returns whether or not, in the underlying tree, the children of a node are placed on a common radius.

Setter: Specifies whether or not, in the underlying tree, the children of a tree node are placed on a common radius. Disabling this feature may produce more compact layout results.


Implementation
    public function get placeChildrenOnCommonRadius():Boolean
    public function set placeChildrenOnCommonRadius(value:Boolean):void
singleCycleLayouterproperty 
singleCycleLayouter:SingleCycleLayouter  [read-only]

Returns the SingleCycleLayouter used for laying out single node cycles

Configuring that layouter has effects upon single cycle layouts


Implementation
    public function get singleCycleLayouter():SingleCycleLayouter
Constructor Detail
CircularLayouter()Constructor
public function CircularLayouter(init:Boolean = true)

Create a new instance of this layouter.

The default values are:

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.

See also

Method Detail
canLayoutCore()method
override public function canLayoutCore(graph:LayoutGraph):Boolean

Always returns true.

Parameters

graph:LayoutGraph

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

Calculates a layout for the given graph. The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph. This method is not side effect free in the sense that the order of edges or nodes in the input graph may change during the layout process.

Parameters

layoutGraph:LayoutGraph

doLayoutCore()method 
override public function doLayoutCore(graph:LayoutGraph):void

Core layout routine.

Parameters

graph:LayoutGraph

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

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

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

See also

newCircularLayouter()method 
public static function newCircularLayouter():CircularLayouter

Create a new instance of this layouter.

The default values are:

Returns
CircularLayouter

See also

Constant Detail
BCC_COMPACTConstant
public static const BCC_COMPACT:int = 0

Layout style specifier. In this layout style the nodes within a biconnected component of the input graph are treated as separate partitions. If a node belongs to more biconnected components, it will be assigned to the one that seems to be more suitable.

This parameter can be set with layoutStyle

See also

BCC_ISOLATEDConstant 
public static const BCC_ISOLATED:int = 1

Layout style specifier. In this layout style the nodes within a biconnected component of the input graph are treated as separate partitions. If a node belongs to more biconnected components, it will form an isolated partition and will be laid out in between all of it's biconnected component cycles.

This parameter can be set with layoutStyle

See also

CIRCLE_ID_HOLDER_DPKEYConstant 
public static const CIRCLE_ID_HOLDER_DPKEY:Object = y.layout.circular.CircularLayouter.CIRCLE_ID_HOLDER_DPKEY

Used for publishing the final circle information. If the com.yworks.yfiles.base.DataProvider associated to this key is also a com.yworks.yfiles.base.DataAcceptor, the integer circle id of each node is stored using the acceptor's setInt (com.yworks.yfiles.base.DataAcceptor.setInt()) method. Otherwise, the provider's values should be of type com.yworks.yfiles.util.IntValueSettable whose setValue (com.yworks.yfiles.util.IntValueSettable.value) method is used to store the integer circle id of each node.

See also

CIRCULAR_CUSTOM_GROUPSConstant 
public static const CIRCULAR_CUSTOM_GROUPS:int = 2

Layout style specifier. In this layout style the user can specify groups that will each form a separate partition. To specify groups, a com.yworks.yfiles.base.DataProvider with key CIRCULAR_CUSTOM_GROUPS_DPKEY must be registered.

This parameter can be set with layoutStyle

See also

CIRCULAR_CUSTOM_GROUPS_DPKEYConstant 
public static const CIRCULAR_CUSTOM_GROUPS_DPKEY:Object = y.layout.circular.CircularLayouter.CIRCULAR_CUSTOM_GROUPS_DPKEY

This key is used to identify custom groups.

PARTITION_LAYOUTSTYLE_CYCLICConstant 
public static const PARTITION_LAYOUTSTYLE_CYCLIC:int = 0

Place each node of a partition on the boundary of a circle.

This style is very fast, but the results may need much space.

This parameter can be set with partitionLayoutStyle

See also

PARTITION_LAYOUTSTYLE_DISKConstant 
public static const PARTITION_LAYOUTSTYLE_DISK:int = 1

Create semi-compact layout for each partition.

This style places nodes in the inside and the border of a circle and arranges them in an organic manner, leading to more compact layout. Only nodes with connections into other partitions are guaranteed to lie on the boundary of the resulting disk. This style may come with a performance penalty. This parameter can be set with partitionLayoutStyle

See also

PARTITION_LAYOUTSTYLE_ORGANICConstant 
public static const PARTITION_LAYOUTSTYLE_ORGANIC:int = 2

Create most compact layout for each partition.

This style creates an organic circular layout for each partition. Even nodes that connect into different partitions may be placed in the inside of the resulting disk. This style may come with a performance penalty.

This parameter can be set with partitionLayoutStyle

See also

SINGLE_CYCLEConstant 
public static const SINGLE_CYCLE:int = 3

Layout style specifier. In this layout style all nodes of the input graph will be put on or inside a single cycle.

This parameter can be set with layoutStyle

See also