RAD Studio (Common)
ContentsIndex
PreviousUpNext
Together Diagram Layout Options

ToolsOptionsTogetherVariousDiagramLayout 

Descriptions for diagram layout options. 

Layout options define the alignment of diagram elements.

General group Options 
Description and default value 
Layout algorithm 
UML diagrams can be thought of as graphs (with vertices and edges). Therefore, graph data structures (algorithms) can be applied to the UML diagrams for diagram layout. Click the drop-down arrow to select a layout algorithm. The various algorithms and their optional settings are described below. The algorithm that you specify executes when choosing LayoutDo full layout on the diagram context menu. The following options are available:
· <autoselect>
· Hierarchical
· Together
· Tree
· Orthogonal
· Spring Embedder
The default value is Together.  
Recursive layout 
This option is available for all layout algorithms. Selecting this option allows to layout all subelements within containers while laying out diagram nodes, thus enabling to lay out inner substructure. This option is useful for the composite states or components.  

 

Hierarchical group Options 
Description and default value 
Hybrid proportion parameter 
Used in conjunction with the Hybrid ordering heuristic. The optimal setting for this value is 0.7.  
Inheritance 
This option defines how nodes are aligned with each other if they are connected by an inheritance link.
Horizontal - Nodes connected by inheritance are aligned horizontally
Vertical - Nodes connected by inheritance are aligned vertically  
Justification 
This option defines the adjustment of nodes. The Justification setting depends on the Inheritance setting. Select from the following:
· Top: If the Inheritance option is set as Vertical, all nodes in a column are aligned at the left of the column. If the Inheritance option is set as Horizontal, all nodes in a row are aligned at the top of the row.
· Center: If the Inheritance option is set as Vertical, all nodes in a column are aligned at the center of the column. If the Inheritance option is set as Horizontal, all nodes in a row are aligned at the center of the row.
· Bottom: If the Inheritance option is set as Vertical, all nodes in a column are aligned at the right of the column. If the Inheritance option is set as Horizontal, all nodes in a row are aligned at the bottom of the row.  
Layer ordering heuristics 
The heuristics are used to sort nodes among each layer to minimize edge-crossings:
· Barycenter: The Barycenter heuristic reorders the nodes on node N according to the barycenter weight. The weight of node N is calculated as a simple average of all its successors/predecessors relative coordinates.
· Median: The Median heuristic reorders the nodes on node N according to the median weight. The weight of node N is calculated as a simple average of the relative positions of this node dealing only with two central successors/predecessors coordinates.
· Hybrid: The Hybrid heuristic combines the Median and Barycenter heuristics.  
Minimal horizontal / vertical distance 
Minimal allowed distance between elements in pixels. Here you can specify Vertical and Horizontal distance options.  

 

Together group Options 
Description and default value 
Inheritance 
This option defines how nodes are aligned with each other if they are connected by an inheritance link. Select either:
· From left to right - nodes connected by inheritance are aligned horizontally from left to right.
· From right to left - nodes connected by inheritance are aligned horizontally from right to left.
· From top to bottom - nodes connected by inheritance are aligned vertically from top to bottom.
· From bottom to top - nodes connected by inheritance are aligned vertically from bottom to top.  
Justification 
This option defines the adjustment of nodes. The Justification setting depends on the Inheritance setting. The elements are aligned as summarized in the following table:
Inheritance: Justification: Top:Center:Bottom:
Left-right Right of the columnCenter of the columnLeft of the column
Right-leftLeft of the columnCenter of the columnRight of the column
Top-bottomBottom of the rowCenter of the rowTop of the row
Bottom-topTop of the rowCenter of the rowBottom of the row  

 

Tree group Option  
Description and default value 
Hierarchy 
This option defines the hierarchy direction of the elements.
· Horizontal - Elements are aligned horizontally.
· Vertical - Elements are aligned vertically.  
Reverse hierarchy 
The last in the hierarchy element is laid out first in the diagram.  
Minimal horizontal (or: vertical) distance 
Distance between elements is in pixels. Here you can specify Vertical and Horizontal distance options.  
Justification 
This option defines the adjustment of elements. The Justification setting is dependent on the Hierarchy direction setting. Select from the following:
· Top: If the Hierarchy direction option is set to Vertical, all nodes in a column are aligned at the left of the column. If the Hierarchy direction option is set to Horizontal, all nodes in a row are aligned at the top of the row.
· Center: If the Hierarchy direction option is set to Vertical, all nodes in a column are aligned at the center of the column. If the Hierarchy direction option is set to Horizontal, all nodes in a row are aligned at the center of the row.
· Bottom:If the Hierarchy direction option is set to Vertical, all nodes in a column are aligned at the right of the column. If the Hierarchy direction option is set to Horizontal, all nodes in a row are aligned at the bottom of the row.  
Process non-tree edges 
If this option is selected, non-tree edges are bent to fit into the diagram layout.  

 

Orthogonal group Options 
Description and default value 
Node placement strategy 
There are three strategies for node placement: Tree, Balanced, and Smart.
· Tree: The Tree node placement strategy creates a spanning-tree diagram layout. The spanning-tree for the given graph is calculated and diagram nodes are placed on the lattice to minimize the tree edges length. This minimizes the distance between nodes that are linked with a tree-edge.
· Balanced:The Balanced node placement strategy uses a balanced ordering of the vertices of the graph as a starting point. Balanced means that the neighbors of each vertex V are as evenly distributed to the left and right of V as possible.
· Smart:The Smart node placement strategy sorts all vertices according to the in/out degrees for each vertex and fills the lattice starting from the center with the vertices with the greatest degree.  
Distance between elements 
Distance is in pixels. Specifies the minimum distance between diagram elements.  

 

Spring Embedder group Options 
Description and default value 
Spring force 
Specify the rigidity of the springs. The greater value you specify, the less will be the length of edges in the final graph.  
Spring movement factor 
Specify the nodes movement factor. The more value you specify, the more distance will be between the nodes in the final graph. If you specify 0 as the movement factor, you will get random layout of the nodes.  
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!