Package | com.yworks.yfiles.layout.organic |
Class | public class OrganicLayouter |
Inheritance | OrganicLayouter CanonicMultiStageLayouter YObject Object |
Property | Defined By | ||
---|---|---|---|
activateDeterministicMode : Boolean
Getter:
Returns whether or not this layouter is in deterministic mode. | OrganicLayouter | ||
activateTreeBeautifier : Boolean
Specifies whether or not to activate the subtree beautifier. | OrganicLayouter | ||
attraction : int
Specifies the current attraction. | OrganicLayouter | ||
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 | ||
finalTemperature : Number
Specifies the final temperature. | OrganicLayouter | ||
gravityFactor : Number
Specifies the gravity factor. | OrganicLayouter | ||
groupBoundsCalculator : GroupBoundsCalculator
Getter:
Returns the GroupBoundsCalculator instance that is used for the calculation of the group nodes' bounds if a hierarchically grouped graph is being laid out. | OrganicLayouter | ||
groupNodeCompactness : Number
Getter:
Returns the group node compactness factor. | OrganicLayouter | ||
groupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm. | CanonicMultiStageLayouter | ||
groupNodePolicy : int
Getter:
Returns the policy for group nodes. | OrganicLayouter | ||
hideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins. | CanonicMultiStageLayouter | ||
initialPlacement : int
Specifies the initial placement strategy. | OrganicLayouter | ||
initialTemperature : Number
Specifies the initial temperature. | OrganicLayouter | ||
iterationFactor : Number
Specifies the iteration factor of this layouter. | OrganicLayouter | ||
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
Specifies the maximum duration granted to this layouter. | OrganicLayouter | ||
obeyNodeSize : Boolean
Specifies whether or not node sizes should be considered by this layouter. | OrganicLayouter | ||
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 | ||
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 : int
Specifies the general edge length that should be attained by this layouter. | OrganicLayouter | ||
repulsion : int
Specifies the current repulsion. | OrganicLayouter | ||
selfLoopLayouter : LayoutStage
Getter:
Returns the LayoutStage used for routing Self-loops. | CanonicMultiStageLayouter | ||
selfLoopLayouterEnabled : Boolean
Getter:
Returns whether or not the SelfLoopLayouter is enabled. | CanonicMultiStageLayouter | ||
sphereOfAction : int
Specifies the sphere of action for this layouter. | OrganicLayouter | ||
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 | ||
---|---|---|---|
OrganicLayouter(init:Boolean = true)
Returns a new organic Layouter. | OrganicLayouter | ||
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]
Returns always true because this algorithms has no preconditions. | OrganicLayouter | ||
dispose():void
Frees resources
| OrganicLayouter | ||
doLayout(layoutGraph:LayoutGraph):void
Calculates a layout for the given graph. | CanonicMultiStageLayouter | ||
Calculates a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
doLayoutCore(graph:LayoutGraph):void [override]
Invokes the core layout algorithm. | OrganicLayouter | ||
enableOnlyCore():void
Disables all layout stages and performs only the core layouter. | CanonicMultiStageLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | OrganicLayouter | ||
hashCode():int | YObject | ||
[static]
Returns a new organic Layouter. | OrganicLayouter | ||
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 | ||
CanonicMultiStageLayouter | |||
initOrganicLayouter():void
Initializes this object. | OrganicLayouter |
Constant | Defined By | ||
---|---|---|---|
ALL : int = 0 [static]
Sphere of action specifier. | OrganicLayouter | ||
AS_IS : int = 2 [static]
Initial placement strategy. | OrganicLayouter | ||
FIXED_GROUP_NODES_DPKEY : Object = y.layout.organic.OrganicLayouter.FIXED_GROUP_NODES_DPKEY [static]
DataProvider key used in conjunction with hierarchically grouped graphs. | OrganicLayouter | ||
FIXED_GROUPS_POLICY : int = 1 [static]
Node group policy specifier. | OrganicLayouter | ||
IGNORE_GROUPS_POLICY : int = 2 [static]
Node group policy specifier. | OrganicLayouter | ||
LAYOUT_GROUPS_POLICY : int = 0 [static]
Node group policy specifier. | OrganicLayouter | ||
MAINLY_SELECTION : int = 1 [static]
Sphere of action specifier. | OrganicLayouter | ||
ONLY_SELECTION : int = 2 [static]
Sphere of action specifier. | OrganicLayouter | ||
PREFERRED_EDGE_LENGTH_DATA : Object = OrganicLayouter.EDGE_LENGTH_DATA [static]
Key used to associate a com.yworks.yfiles.base.DataProvider with a LayoutGraph. | OrganicLayouter | ||
RANDOM : int = 0 [static]
Initial placement strategy. | OrganicLayouter | ||
SPHERE_OF_ACTION_NODES : Object = SPHERE_OF_ACTION_NODES [static]
DataProvider key used in conjunction with the sphere-of-action feature. | OrganicLayouter | ||
ZERO : int = 1 [static]
Initial placement strategy. | OrganicLayouter |
activateDeterministicMode | property |
activateDeterministicMode:Boolean
Getter: Returns whether or not this layouter is in deterministic mode.
Setter: Specifies whether or not this layouter should work in a deterministic mode. In a deterministic mode this layouter produces the same layouts for the same input graph and layout parameters.By default deterministic mode is inactive.
public function get activateDeterministicMode():Boolean
public function set activateDeterministicMode(value:Boolean):void
activateTreeBeautifier | property |
activateTreeBeautifier:Boolean
Specifies whether or not to activate the subtree beautifier. Activating this feature lays out subtrees within the given graph structure in an optimized way.
By default this feature is inactive.
public function get activateTreeBeautifier():Boolean
public function set activateTreeBeautifier(value:Boolean):void
attraction | property |
attraction:int
Specifies the current attraction.
public function get attraction():int
public function set attraction(value:int):void
finalTemperature | property |
finalTemperature:Number
Specifies the final temperature.
This is an absolute temperature. If the average temperature falls under this value, the layout process comes to a halt. The default is 1.0d
.
public function get finalTemperature():Number
public function set finalTemperature(value:Number):void
gravityFactor | property |
gravityFactor:Number
Specifies the gravity factor. The magnitude of the gravity factor determines the strength of the force towards the barycenter of the graph. A high factor layout tends to cluster nodes around the barycenter of the graph. A low factor stretches the outskirts of the graph far away from the center.
By default a value of 0.0
is assumed.
public function get gravityFactor():Number
public function set gravityFactor(value:Number):void
groupBoundsCalculator | property |
groupBoundsCalculator:GroupBoundsCalculator
Getter: Returns the GroupBoundsCalculator instance that is used for the calculation of the group nodes' bounds if a hierarchically grouped graph is being laid out. By default a com.yworks.yfiles.layout.grouping.MinimumSizeGroupBoundsCalculator instance is registered with this instance.
Setter: Sets the instance used for the calculation of the group nodes' bounds if a hierarchically grouped graph is being laid out. public function get groupBoundsCalculator():GroupBoundsCalculator
public function set groupBoundsCalculator(value:GroupBoundsCalculator):void
See also
groupNodeCompactness | property |
groupNodeCompactness:Number
Getter: Returns the group node compactness factor.
Setter: Sets the compactness of group nodes. Values should be in the range [0..1], where 0 results in group nodes not affecting the overall layout too much, whereas a value of 1 forces nodes in the same group to be clustered tightly. public function get groupNodeCompactness():Number
public function set groupNodeCompactness(value:Number):void
IllegalArgumentException — if compactness value does not lie in [0..1]
|
groupNodePolicy | property |
groupNodePolicy:int
Getter: Returns the policy for group nodes. This policy controls the behavior of this layouter when acting on hierarchically grouped graphs. The default is LAYOUT_GROUPS_POLICY.
Setter: Sets the policy for group nodes. This policy controls the behavior of this layouter when acting on hierarchically grouped graphs. This should be one of FIXED_GROUPS_POLICY, LAYOUT_GROUPS_POLICY, or IGNORE_GROUPS_POLICY. public function get groupNodePolicy():int
public function set groupNodePolicy(value:int):void
See also
initialPlacement | property |
initialPlacement:int
Specifies the initial placement strategy.
The default value is AS_IS.
public function get initialPlacement():int
public function set initialPlacement(value:int):void
See also
initialTemperature | property |
initialTemperature:Number
Specifies the initial temperature.
The temperature will be multiplied with the preferredEdgeLength
and then assigned as the initial node heat.
The default is 0.1d
.
public function get initialTemperature():Number
public function set initialTemperature(value:Number):void
iterationFactor | property |
iterationFactor:Number
Specifies the iteration factor of this layouter. A higher iteration factor usually means better layout results and longer running times.
By default an iteration factor of 3
is set.
public function get iterationFactor():Number
public function set iterationFactor(value:Number):void
maximumDuration | property |
maximumDuration:uint
Specifies the maximum duration granted to this layouter.
public function get maximumDuration():uint
public function set maximumDuration(value:uint):void
obeyNodeSize | property |
obeyNodeSize:Boolean
Specifies whether or not node sizes should be considered by this layouter.
If you want to layout a diagram with big nodes in it you can reduce node overlaps by setting this feature to true
.
Defaults to true
.
public function get obeyNodeSize():Boolean
public function set obeyNodeSize(value:Boolean):void
preferredEdgeLength | property |
preferredEdgeLength:int
Specifies the general edge length that should be attained by this layouter.
By default an edge length of 80
is set.
public function get preferredEdgeLength():int
public function set preferredEdgeLength(value:int):void
repulsion | property |
repulsion:int
Specifies the current repulsion.
public function get repulsion():int
public function set repulsion(value:int):void
sphereOfAction | property |
sphereOfAction:int
Specifies the sphere of action for this layouter.
The default value is ALL.
public function get sphereOfAction():int
public function set sphereOfAction(value:int):void
See also
OrganicLayouter | () | Constructor |
public function OrganicLayouter(init:Boolean = true)
Returns a new organic Layouter.
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
Returns always true
because this algorithms has no preconditions.
Parameters
graph:LayoutGraph |
Boolean — true .
|
dispose | () | method |
public function dispose():void
Frees resources
doLayoutCore | () | method |
override public function doLayoutCore(graph:LayoutGraph):void
Invokes the core layout algorithm.
Parameters
graph:LayoutGraph |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initOrganicLayouter | () | method |
protected final function initOrganicLayouter():void
Initializes this object. See the documentation of the corresponding factory method newOrganicLayouter()
for details.
See also
newOrganicLayouter | () | method |
public static function newOrganicLayouter():OrganicLayouter
Returns a new organic Layouter.
ReturnsOrganicLayouter |
ALL | Constant |
public static const ALL:int = 0
Sphere of action specifier. Displace all nodes.
See also
AS_IS | Constant |
public static const AS_IS:int = 2
Initial placement strategy. Start with given positions.
See also
FIXED_GROUP_NODES_DPKEY | Constant |
public static const FIXED_GROUP_NODES_DPKEY:Object = y.layout.organic.OrganicLayouter.FIXED_GROUP_NODES_DPKEY
DataProvider key used in conjunction with hierarchically grouped graphs. If this data provider key is registered with the LayoutGraph, then its associated data provider must return for each group node node in the input graph a boolean value indicating whether its contents/children should be treated as fixed or not.
See also
FIXED_GROUPS_POLICY | Constant |
public static const FIXED_GROUPS_POLICY:int = 1
Node group policy specifier. This layouter will keep the relative positions of nodes that belong to the same group. The layouter will take the fixed groups into account when placing the other nodes of the graph.
IGNORE_GROUPS_POLICY | Constant |
public static const IGNORE_GROUPS_POLICY:int = 2
Node group policy specifier. This layouter will ignore all grouping related information when laying out the graph.
LAYOUT_GROUPS_POLICY | Constant |
public static const LAYOUT_GROUPS_POLICY:int = 0
Node group policy specifier. This layouter will consider grouping information of an input graph. It will layout the contents of groups in a way that highlights their togetherness.
MAINLY_SELECTION | Constant |
public static const MAINLY_SELECTION:int = 1
Sphere of action specifier.
Displace mainly selected nodes, but allow minor movement of unselected nodes as well. A node is considered to be selected if the LayoutGraph DataProvider registered with the key SPHERE_OF_ACTION_NODES returns true
for that node.
See also
ONLY_SELECTION | Constant |
public static const ONLY_SELECTION:int = 2
Sphere of action specifier.
Displace only selected nodes A node is considered to be selected if the LayoutGraph DataProvider registered with the key SPHERE_OF_ACTION_NODES returns true
for that node.
See also
PREFERRED_EDGE_LENGTH_DATA | Constant |
public static const PREFERRED_EDGE_LENGTH_DATA:Object = OrganicLayouter.EDGE_LENGTH_DATA
Key used to associate a com.yworks.yfiles.base.DataProvider with a LayoutGraph.
The associated DataProvider must return an int
values for each edge of the LayoutGraph. The value returned for a specific edge will be interpreted as its preferred edge length.
int getWeight(Edge)
is provided that returns for each edge a double value between 0.0 and 1.0, then these edge weights can be translated to edge length preferences between 0 and 200 that the OrganicLayouter tries to obey. import y.util.DataProviderAdapter; //define an adequate data provider DataProviderAdapter edgeLengthData = new DataProviderAdapter() { public int getInt(Object o) { return (int)(200*getWeight((Edge)o)); } } LayoutGraph graph = ...; OrganicLayouter layouter = ...; //register the data provider graph.addDataProvider(PREFERRED_EDGE_LENGTH_DATA, edgeLengthData); //launch the layouter layouter.doLayout(graph);
See also
RANDOM | Constant |
public static const RANDOM:int = 0
Initial placement strategy. Start with randomly chosen positions.
See also
SPHERE_OF_ACTION_NODES | Constant |
public static const SPHERE_OF_ACTION_NODES:Object = SPHERE_OF_ACTION_NODES
DataProvider key used in conjunction with the sphere-of-action feature. If this data provider key is being used, then it must return for each node in the input graph a boolean value indicating whether or not it should be handled by this layouter.
See also
ZERO | Constant |
public static const ZERO:int = 1
Initial placement strategy. Start with all positions set to (0,0,0).
See also