Package | com.yworks.yfiles.layout.orthogonal |
Class | public class CompactOrthogonalLayouter |
Inheritance | CompactOrthogonalLayouter PartitionLayouter AbstractLayoutStage YObject Object |
The algorithm is realized as a com.yworks.yfiles.layout.PartitionLayouter, that uses com.yworks.yfiles.layout.PartitionLayouter_EdgeBetweennessPartitionFinder to partition the graph, com.yworks.yfiles.layout.orthogonal.OrthogonalLayouter to layout the graph partitions, com.yworks.yfiles.layout.PartitionLayouter_ComponentPartitionPlacer to place the partitions, and finally com.yworks.yfiles.layout.PartitionLayouter_ChannelInterEdgeRouter to route the edges between partitions. Each of these strategies can be individually configured and/or replaced.
Here is a sample output of the layouter with aspect ratio of the resulting layout bounds set to 1
.
See also
Property | Defined By | ||
---|---|---|---|
aspectRatio : Number
Getter:
Returns the desired aspect ratio of the resulting layout bounds. | CompactOrthogonalLayouter | ||
coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | ||
gridSpacing : int
Getter:
Returns the grid spacing used to place the nodes. | CompactOrthogonalLayouter | ||
interEdgeRouter : PartitionLayouter_InterEdgeRouter
Getter:
Returns the currently set InterEdgeRouter instance. | PartitionLayouter | ||
partitionFinder : PartitionLayouter_PartitionFinder
Getter:
Returns the currently set PartitionFinder instance. | PartitionLayouter | ||
partitionPlacer : PartitionLayouter_PartitionPlacer
Getter:
Returns the currently set PartitionPlacer instance. | PartitionLayouter |
Method | Defined By | ||
---|---|---|---|
CompactOrthogonalLayouter(init:Boolean = true)
Create a new instance of this class with a default aspect ratio of 1 and a default grid spacing of 20. | CompactOrthogonalLayouter | ||
canLayout(graph:LayoutGraph):Boolean [override]
Returns canLayoutCore(). | PartitionLayouter | ||
doLayout(graph:LayoutGraph):void [override]
Main layout routine that assigns new layout information to the given graph. | PartitionLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | CompactOrthogonalLayouter | ||
hashCode():int | YObject | ||
[static]
Create a new instance of this class with a default aspect ratio of 1 and a default grid spacing of 20. | CompactOrthogonalLayouter | ||
[static] | PartitionLayouter |
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. | CompactOrthogonalLayouter | ||
initPartitionLayouter():void | PartitionLayouter |
aspectRatio | property |
aspectRatio:Number
Getter: Returns the desired aspect ratio of the resulting layout bounds.
Setter: Sets the desired aspect ratio (i.e. the quotient width/height) of the resulting layout bounds. By default a value of1
is set. This setting will only have an effect if the set com.yworks.yfiles.layout.PartitionLayouter_PartitionPlacer is of the pre-configured type com.yworks.yfiles.layout.PartitionLayouter_ComponentPartitionPlacer. Note: When setting configurable stages after specifying aspect ratio, it is assumed that the aforementioned stages are already properly configured and the previously set aspect ratio will not be passed to these stages.
public function get aspectRatio():Number
public function set aspectRatio(value:Number):void
See also
gridSpacing | property |
gridSpacing:int
Getter: Returns the grid spacing used to place the nodes.
Setter: Sets the grid spacing to be used. By default, a value of20
is set. Setting the grid spacing will only have an effect if the configurable stages have not been replaced by other implementations. Note: When setting configurable stages after specifying grid spacing, it is assumed that the aforementioned stages are already properly configured and the previously set grid spacing will not be passed to these stages.
public function get gridSpacing():int
public function set gridSpacing(value:int):void
CompactOrthogonalLayouter | () | Constructor |
public function CompactOrthogonalLayouter(init:Boolean = true)
Create a new instance of this class with a default aspect ratio of 1 and a default grid spacing of 20.
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.
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initCompactOrthogonalLayouter | () | method |
protected final function initCompactOrthogonalLayouter():void
Initializes this object. See the documentation of the corresponding factory method newCompactOrthogonalLayouter()
for details.
See also
newCompactOrthogonalLayouter | () | method |
public static function newCompactOrthogonalLayouter():CompactOrthogonalLayouter
Create a new instance of this class with a default aspect ratio of 1 and a default grid spacing of 20.
ReturnsCompactOrthogonalLayouter |