Package | com.yworks.yfiles.layout.organic |
Class | public class SmartOrganicLayouter |
Inheritance | SmartOrganicLayouter CanonicMultiStageLayouter YObject Object |
See also
Property | Defined By | ||
---|---|---|---|
automaticGroupNodeCompactionEnabled : Boolean
Specifies whether or not to use the automatic group node compaction. | SmartOrganicLayouter | ||
clusteringQuality : Number
Getter:
Specifies the quality ratio of the clustering algorithm. | SmartOrganicLayouter | ||
clusterNodes : Boolean
Getter:
Returns whether or not a clustering algorithm should be applied. | SmartOrganicLayouter | ||
compactness : Number
Getter:
Returns the property for the compactness of the resulting layout. | SmartOrganicLayouter | ||
componentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph. | CanonicMultiStageLayouter | ||
componentLayouterEnabled : Boolean
Getter:
Returns whether or not ComponentLayouter is enabled. | CanonicMultiStageLayouter | ||
considerNodeLabels : Boolean
Specifies whether or not to consider node labels for the next layout run. | SmartOrganicLayouter | ||
deterministic : Boolean
Getter:
Returns whether the algorithm will behave deterministically in the next layout run. | SmartOrganicLayouter | ||
groupBoundsCalculator : GroupBoundsCalculator
Specifies the com.yworks.yfiles.layout.grouping.GroupBoundsCalculator instance used for calculating the size of group nodes. | SmartOrganicLayouter | ||
groupNodeCompactness : Number
Getter:
Returns the group node compactness factor. | SmartOrganicLayouter | ||
groupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm. | CanonicMultiStageLayouter | ||
hideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins. | CanonicMultiStageLayouter | ||
labelLayouter : LayoutStage
Getter:
Returns the algorithm used for placing labels. | CanonicMultiStageLayouter | ||
labelLayouterEnabled : Boolean
Getter:
Returns whether or not LabelLayouter is enabled. | CanonicMultiStageLayouter | ||
layoutOrientation : int
Specifies the main layout orientation. | CanonicMultiStageLayouter | ||
maximumDuration : uint
Getter:
Returns the maximum duration this algorithm is allowed to run. | SmartOrganicLayouter | ||
minimalNodeDistance : Number
Getter:
Returns the current minimal node distance this algorithm should enforce if the node overlaps allowance property is set to true. | SmartOrganicLayouter | ||
nodeEdgeOverlapAvoided : Boolean
Specifies whether or not the layouter tries to avoid node/edge overlaps. | SmartOrganicLayouter | ||
nodeOverlapsAllowed : Boolean
Getter:
Returns whether node overlaps are allowed (but not encouraged) for the next run. | SmartOrganicLayouter | ||
nodeSizeAware : Boolean
Getter:
Determines whether the algorithm should consider the size of the nodes for the layout. | SmartOrganicLayouter | ||
orientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout. | CanonicMultiStageLayouter | ||
orientationLayouterEnabled : Boolean
Getter:
Returns whether or not the OrientationLayouter is enabled. | CanonicMultiStageLayouter | ||
outputRestriction : OutputRestriction
Getter:
Returns the current OutputRestriction instance set for this instance. | SmartOrganicLayouter | ||
parallelEdgeLayouter : LayoutStage
Getter:
Returns the LayoutStage responsible for routing parallel edges. | CanonicMultiStageLayouter | ||
parallelEdgeLayouterEnabled : Boolean
Getter:
Returns whether or not the ParallelEdgeLayouter is enabled. | CanonicMultiStageLayouter | ||
preferredEdgeLength : Number
Getter:
Returns the currently set default preferred edge length. | SmartOrganicLayouter | ||
preferredMinimalNodeDistance : Number
Getter:
Returns the current preferred minimal node distance this algorithm should use for pairs of nodes that are not directly connected by adjacent edges. | SmartOrganicLayouter | ||
qualityTimeRatio : Number
Specifies the quality to time ratio. | SmartOrganicLayouter | ||
scope : int
Getter:
Returns the scope of the layout. | SmartOrganicLayouter | ||
selfLoopLayouter : LayoutStage
Getter:
Returns the LayoutStage used for routing Self-loops. | CanonicMultiStageLayouter | ||
selfLoopLayouterEnabled : Boolean
Getter:
Returns whether or not the SelfLoopLayouter is enabled. | CanonicMultiStageLayouter | ||
smartComponentLayout : Boolean
Determines whether this instance should configure the ComponentLayouter (componentLayouter) in such a way that it respects the scope's (scope) settings SCOPE_SUBSET and SCOPE_MAINLY_SUBSET by keeping other nodes pinned, even if they reside in different components. | SmartOrganicLayouter | ||
subgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph. | CanonicMultiStageLayouter | ||
subgraphLayouterEnabled : Boolean
Getter:
Returns whether or not the SubgraphLayouter is enabled. | CanonicMultiStageLayouter |
Method | Defined By | ||
---|---|---|---|
SmartOrganicLayouter(init:Boolean = true)
Creates a new SmartOrganicLayouter instance
| SmartOrganicLayouter | ||
appendStage(stage:LayoutStage):void
Appends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
Returns a layout for the given layout graph. | CanonicMultiStageLayouter | ||
Returns a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter. | CanonicMultiStageLayouter | ||
canLayoutCore(graph:LayoutGraph):Boolean [override]
| SmartOrganicLayouter | ||
doLayout(layoutGraph:LayoutGraph):void [override] | SmartOrganicLayouter | ||
Calculates a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
doLayoutCore(graph:LayoutGraph):void [override]
| SmartOrganicLayouter | ||
enableOnlyCore():void
Disables all layout stages and performs only the core layouter. | CanonicMultiStageLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | SmartOrganicLayouter | ||
hashCode():int | YObject | ||
[static]
Creates a new SmartOrganicLayouter instance
| SmartOrganicLayouter | ||
prependStage(stage:LayoutStage):void
Prepends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
removeStage(stage:LayoutStage):void
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage(). | CanonicMultiStageLayouter |
Method | Defined By | ||
---|---|---|---|
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 | ||
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 | ||
Configures the ComponentLayouter (componentLayouter) and graph instance to adhere to the NODE_SUBSET_DATA in case SCOPE_ALL is not set, and to use minimalNodeDistance also for distances between components. | SmartOrganicLayouter | ||
CanonicMultiStageLayouter | |||
initSmartOrganicLayouter():void
Initializes this object. | SmartOrganicLayouter | ||
Resets the ComponentLayouter (componentLayouter) from the previous configureComponentLayouter() call. | SmartOrganicLayouter |
Constant | Defined By | ||
---|---|---|---|
GROUP_NODE_MODE_DATA : Object = y.layout.organic.SmartOrganicLayouter.GROUP_NODE_MODE_DATA [static]
The data provider key for specifying how to handle group nodes. | SmartOrganicLayouter | ||
GROUP_NODE_MODE_FIX_BOUNDS : Object = GROUP_NODE_MODE_FIX_BOUNDS [static]
Group node mode constant that can be used to tag a group node. | SmartOrganicLayouter | ||
GROUP_NODE_MODE_FIX_CONTENTS : Object = GROUP_NODE_MODE_FIX_CONTENTS [static]
Group node mode constant that can be used to tag a group node. | SmartOrganicLayouter | ||
GROUP_NODE_MODE_NORMAL : Object = GROUP_NODE_MODE_NORMAL [static]
Group node mode constant that can be used to tag a group node. | SmartOrganicLayouter | ||
NODE_SUBSET_DATA : Object = SPHERE_OF_ACTION_NODES [static]
The data provider key for specifying the node subset to be laid out. | SmartOrganicLayouter | ||
PREFERRED_EDGE_LENGTH_DATA : Object = OrganicLayouter.EDGE_LENGTH_DATA [static]
The data provider key for specifying the preferred edge lengths for each edge The algorithm expects to find com.yworks.yfiles.base.DataProvider.getInt() integer values associated with each edge. | SmartOrganicLayouter | ||
SCOPE_ALL : int = 0 [static]
Scope constant - used for laying out all nodes. | SmartOrganicLayouter | ||
SCOPE_MAINLY_SUBSET : int = 1 [static]
Scope constant - used for laying out mainly the subset of the nodes. | SmartOrganicLayouter | ||
SCOPE_SUBSET : int = 2 [static]
Scope constant - used for laying out the subset of nodes only. | SmartOrganicLayouter |
automaticGroupNodeCompactionEnabled | property |
automaticGroupNodeCompactionEnabled:Boolean
Specifies whether or not to use the automatic group node compaction. If this option is enabled the group node compactness is determined automatically, i.e., it only depends on the general compactness specified by option compactness). The value specified by option groupNodeCompactness is ignored.
By default this option is enabled.
public function get automaticGroupNodeCompactionEnabled():Boolean
public function set automaticGroupNodeCompactionEnabled(value:Boolean):void
See also
clusteringQuality | property |
clusteringQuality:Number
Getter: Specifies the quality ratio of the clustering algorithm.
Setter: Specifies the quality measure of the clustering algorithm, if option clusterNodes is enabled, Possible values are all doubles d with 0 <= d <= 1. The higher d the higher the clustering quality. Default value is 1.Note: the expected runtime of the clustering algorithm increases with d. The runtime does not depend on the specified maximal duration (see method maximumDuration).
public function get clusteringQuality():Number
public function set clusteringQuality(value:Number):void
See also
clusterNodes | property |
clusterNodes:Boolean
Getter: Returns whether or not a clustering algorithm should be applied.
By default, automatic clustering is not enabled.
Setter: Specifies whether or not a clustering algorithm should be applied to the input graph. If this option is enabled, the following steps are performed during the layout:By default, automatic clustering is not enabled.
Note: the runtime of the clustering algorithm does not depend on the specified maximal duration (see method maximumDuration).
public function get clusterNodes():Boolean
public function set clusterNodes(value:Boolean):void
See also
compactness | property |
compactness:Number
Getter: Returns the property for the compactness of the resulting layout. Lower values result in less compact drawings.
The default value is 0.5
.
0.5d
being a "normal" compactness. The default value is 0.5
.
public function get compactness():Number
public function set compactness(value:Number):void
IllegalArgumentException — if the specified value is less than 0 or greater than 1 .
|
considerNodeLabels | property |
considerNodeLabels:Boolean
Specifies whether or not to consider node labels for the next layout run. Enabling this setting overrides the value of nodeSizeAware, i.e. node sizes are always considered.
Default value is false
.
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.organic.SmartOrganicLayouter doesn't make sense.
public function get considerNodeLabels():Boolean
public function set considerNodeLabels(value:Boolean):void
See also
deterministic | property |
deterministic:Boolean
Getter: Returns whether the algorithm will behave deterministically in the next layout run.
Setter: Sets this algorithm to deterministic mode. If set totrue
, the algorithm will yield the same results if given the exact same input and same settings.
public function get deterministic():Boolean
public function set deterministic(value:Boolean):void
groupBoundsCalculator | property |
groupBoundsCalculator:GroupBoundsCalculator
Specifies the com.yworks.yfiles.layout.grouping.GroupBoundsCalculator instance used for calculating the size of group nodes. The default is com.yworks.yfiles.layout.grouping.MinimumSizeGroupBoundsCalculator.
public function get groupBoundsCalculator():GroupBoundsCalculator
public function set groupBoundsCalculator(value:GroupBoundsCalculator):void
ReferenceError — if the argument is null
|
See also
groupNodeCompactness | property |
groupNodeCompactness:Number
Getter: Returns the group node compactness factor. Note: the specified value is only considered if option automaticGroupNodeCompactionEnabled is disabled and if there is no partition grid structure.
By default this value is 0.4
.
By default this value is 0.4
.
public function get groupNodeCompactness():Number
public function set groupNodeCompactness(value:Number):void
IllegalArgumentException — if compactness value does not lie in [0..1]
|
See also
maximumDuration | property |
maximumDuration:uint
Getter: Returns the maximum duration this algorithm is allowed to run. This is a soft limit
By default, the maximum duration is set to 30 seconds.
Setter: Sets the soft limit for the maximum duration this algorithm is allowed to execute.By default, the maximum duration is set to 30 seconds.
public function get maximumDuration():uint
public function set maximumDuration(value:uint):void
IllegalArgumentException — if the specified duration is less than 0 .
|
minimalNodeDistance | property |
minimalNodeDistance:Number
Getter:
Returns the current minimal node distance this algorithm should enforce if the node overlaps allowance property is set to true
.
The default value is 0
.
The default value is 0
.
public function get minimalNodeDistance():Number
public function set minimalNodeDistance(value:Number):void
See also
nodeEdgeOverlapAvoided | property |
nodeEdgeOverlapAvoided:Boolean
Specifies whether or not the layouter tries to avoid node/edge overlaps. Note that the current implementation does not guarantee the non-existence of overlaps but tries to avoid them. Furthermore, the post-processing step that removes node overlaps ignores node/edge overlaps, i.e., the number of node/edge overlaps may increase if option nodeOverlapsAllowed is disabled.
By default, this option is not enabled.
public function get nodeEdgeOverlapAvoided():Boolean
public function set nodeEdgeOverlapAvoided(value:Boolean):void
See also
nodeOverlapsAllowed | property |
nodeOverlapsAllowed:Boolean
Getter: Returns whether node overlaps are allowed (but not encouraged) for the next run.
By default, node overlaps are not allowed.
Note: if scope is set to SCOPE_SUBSET or SCOPE_MAINLY_SUBSET, there might be some overlapping nodes even if this option is set to false.
Setter: Determines whether the next layout run should enforce non-overlapping nodes. The minimal distance between each pair of nodes is determined by the minimal node distance property.By default, node overlaps are not allowed.
Note: if scope is set to SCOPE_SUBSET or SCOPE_MAINLY_SUBSET, there might be some overlapping nodes even if this option is set to false.
public function get nodeOverlapsAllowed():Boolean
public function set nodeOverlapsAllowed(value:Boolean):void
See also
nodeSizeAware | property |
nodeSizeAware:Boolean
Getter:
Determines whether the algorithm should consider the size of the nodes for the layout.
If set to true
the algorithm will take the node size into account for given preferred edge lengths.
public function get nodeSizeAware():Boolean
public function set nodeSizeAware(value:Boolean):void
outputRestriction | property |
outputRestriction:OutputRestriction
Getter: Returns the current OutputRestriction instance set for this instance. The default is com.yworks.yfiles.layout.organic.OutputRestriction.NONE.
Setter: Sets a restriction on the output generated by this layouter public function get outputRestriction():OutputRestriction
public function set outputRestriction(value:OutputRestriction):void
See also
preferredEdgeLength | property |
preferredEdgeLength:Number
Getter:
Returns the currently set default preferred edge length.
The algorithm will try to find a drawing where most of the edges have this length. This default is applied to all edges where there is no specific edge length given using the double
DataProvider instance bound to the graph using the PREFERRED_EDGE_LENGTH_DATA key.
public function get preferredEdgeLength():Number
public function set preferredEdgeLength(value:Number):void
See also
preferredMinimalNodeDistance | property |
preferredMinimalNodeDistance:Number
Getter: Returns the current preferred minimal node distance this algorithm should use for pairs of nodes that are not directly connected by adjacent edges.
Setter: Sets the minimal node distance this algorithm should try to obey for the next run. public function get preferredMinimalNodeDistance():Number
public function set preferredMinimalNodeDistance(value:Number):void
qualityTimeRatio | property |
qualityTimeRatio:Number
Specifies the quality to time ratio. This setting determines the ratio of layout quality versus time consumption. The higher the ratio, the better the quality of the resulting layout but the longer it may take to perform the layout.
The default value is 0.6
.
public function get qualityTimeRatio():Number
public function set qualityTimeRatio(value:Number):void
IllegalArgumentException — if the specified ratio is less than 0 or greater than 1 .
|
scope | property |
scope:int
Getter: Returns the scope of the layout.
Setter: Sets the scope for the next layout run. The scope determines which of the nodes should be affected and how they should be affected by the layout run.Defaults to SCOPE_ALL.
Note: For all scopes but SCOPE_ALL, a data provider for key NODE_SUBSET_DATA has to be registered.
public function get scope():int
public function set scope(value:int):void
See also
smartComponentLayout | property |
smartComponentLayout:Boolean
Determines whether this instance should configure the ComponentLayouter (componentLayouter) in such a way that it respects the scope's (scope) settings SCOPE_SUBSET and SCOPE_MAINLY_SUBSET by keeping other nodes pinned, even if they reside in different components.
The default is false
.
public function get smartComponentLayout():Boolean
public function set smartComponentLayout(value:Boolean):void
See also
SmartOrganicLayouter | () | Constructor |
public function SmartOrganicLayouter(init:Boolean = true)
Creates a new SmartOrganicLayouter instance
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.
|
canLayoutCore | () | method |
override public function canLayoutCore(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
configureComponentLayouter | () | method |
protected function configureComponentLayouter(graph:LayoutGraph, layouter:ComponentLayouter):void
Configures the ComponentLayouter (componentLayouter) and graph instance to adhere to the NODE_SUBSET_DATA in case SCOPE_ALL is not set, and to use minimalNodeDistance also for distances between components. This will result in the component layouter not rearranging components if they contain pinned-down nodes.
Parameters
graph:LayoutGraph — the graph that will be arranged
| |
layouter:ComponentLayouter — the layouter to reconfigure
|
See also
doLayout | () | method |
doLayoutCore | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initSmartOrganicLayouter | () | method |
protected final function initSmartOrganicLayouter():void
Initializes this object. See the documentation of the corresponding factory method newSmartOrganicLayouter()
for details.
See also
newSmartOrganicLayouter | () | method |
public static function newSmartOrganicLayouter():SmartOrganicLayouter
Creates a new SmartOrganicLayouter instance
ReturnsSmartOrganicLayouter |
unconfigureComponentLayouter | () | method |
protected function unconfigureComponentLayouter(graph:LayoutGraph, layouter:ComponentLayouter):void
Resets the ComponentLayouter (componentLayouter) from the previous configureComponentLayouter() call.
Parameters
graph:LayoutGraph — the graph that has been arranged
| |
layouter:ComponentLayouter — the layouter to reset.
|
See also
GROUP_NODE_MODE_DATA | Constant |
public static const GROUP_NODE_MODE_DATA:Object = y.layout.organic.SmartOrganicLayouter.GROUP_NODE_MODE_DATA
The data provider key for specifying how to handle group nodes.
The algorithm expects for each node to find one of the following constants or null
:
null
will be treated like GROUP_NODE_MODE_NORMAL.
See also
GROUP_NODE_MODE_FIX_BOUNDS | Constant |
public static const GROUP_NODE_MODE_FIX_BOUNDS:Object = GROUP_NODE_MODE_FIX_BOUNDS
Group node mode constant that can be used to tag a group node. Use the GROUP_NODE_MODE_DATA DataProvider key to associate this constant with a group node to indicate that its bounds should be treated as fixed an its contents should never exceed those bounds.
See also
GROUP_NODE_MODE_FIX_CONTENTS | Constant |
public static const GROUP_NODE_MODE_FIX_CONTENTS:Object = GROUP_NODE_MODE_FIX_CONTENTS
Group node mode constant that can be used to tag a group node. Use the GROUP_NODE_MODE_DATA DataProvider key to associate this constant with a group node to indicate that it can be moved like an ordinary group node however its contents should remain fixed relative to the position of the group node. Note that this implicitly fixes all descendants of the group node.
See also
GROUP_NODE_MODE_NORMAL | Constant |
public static const GROUP_NODE_MODE_NORMAL:Object = GROUP_NODE_MODE_NORMAL
Group node mode constant that can be used to tag a group node. Use the GROUP_NODE_MODE_DATA DataProvider key to associate this constant with a group node to indicate that it should be treated like an ordinary group node.
See also
NODE_SUBSET_DATA | Constant |
public static const NODE_SUBSET_DATA:Object = SPHERE_OF_ACTION_NODES
The data provider key for specifying the node subset to be laid out. The algorithm expects for each node in the graph to find a boolean (com.yworks.yfiles.base.DataProvider.getBool()) that indicates whether the node belongs to the "sphere of action".
See also
PREFERRED_EDGE_LENGTH_DATA | Constant |
public static const PREFERRED_EDGE_LENGTH_DATA:Object = OrganicLayouter.EDGE_LENGTH_DATA
The data provider key for specifying the preferred edge lengths for each edge The algorithm expects to find com.yworks.yfiles.base.DataProvider.getInt() integer values associated with each edge.
See also
SCOPE_ALL | Constant |
SCOPE_MAINLY_SUBSET | Constant |
public static const SCOPE_MAINLY_SUBSET:int = 1
Scope constant - used for laying out mainly the subset of the nodes. The above mentioned subset has to be specified by registering an appropriate com.yworks.yfiles.base.DataProvider for key NODE_SUBSET_DATA.
See also
SCOPE_SUBSET | Constant |
public static const SCOPE_SUBSET:int = 2
Scope constant - used for laying out the subset of nodes only. The above mentioned subset has to be specified by registering an appropriate com.yworks.yfiles.base.DataProvider for key NODE_SUBSET_DATA.
See also