Diagram Layout

From RAD Studio
Jump to: navigation, search

Go Up to Modeling Concepts

Managing diagram layout

In the Diagram View, you can arrange UML model elements (nodes and links) on your diagram to optimize the diagram layout for viewing or printing. You can arrange the layout of your diagrams automatically or manually. You can also lay out your diagrams automatically and then adjust the arrangement manually:

Note: Manual layouts are saved when you close a diagram or project, and restored when you later open it. Manual layouts are not preserved when you run any of the auto-layout commands (Do Full Layout, Optimize Sizes, and so on).
  • To automatically manage the layout of diagrams, you can use the following layout commands on the context menu in the Diagram View: Do Full Layout and Layout Selected Elements, Layout for Printing, Route All Links and Route Links, Optimize Sizes, Expand All, Collapse All, and Brief View.

The automatic layout commands

In the Diagram View, the Layout submenu of the context menu provides commands for the automatic layout. The context menu of the diagram background provides commands for laying out all elements of the diagram and the context menu of diagram elements provides commands for laying out only the currently selected diagram elements. The following layout commands can be available:

  • Do Full Layout and Layout Selected Elements—Lay out all diagram elements according to the layout algorithm defined in the Layout page in the Options dialog box. The Layout Selected Elements command lays out only the currently selected diagram elements.
  • Layout for Printing—Lays out all diagram elements, optimizing the diagram for printing, regardless of the layout algorithm selected for this diagram. For instance, all node elements will be positioned in a way that permits each node element be printed on one page (no one node element is printed on more than one page.)
  • Route All Links and Route Links—Streamlines the links, removing bending points.
  • Optimize Sizes—Enlarges or shrinks all the elements on the diagram to their optimal sizes.
  • Expand All and Collapse All—Shows or hides all members in all compartments.
  • Brief View—Switches between hiding (Brief View is checked) and showing compartments.

Setting the layout algorithm for the Do Full Layout command

The Do Full Layout and Layout Selected Elements commands lay out diagram elements according to the layout algorithm defined for the current diagram in the Layout page in the Options dialog box. Available layout algorithms are: Standard, Hierarchical, Orthogonal, Spring Embedder, Tree, and <autoselect>. See the descriptions of these algorithms in Diagram Layout options.

You can use the same layout algorithm for all diagrams in the entire project or you can use different layout algorithms to particular diagrams selecting the appropriate (level) branch in the Modeling > (level) > Diagram > Layout tree. The selected algorithm is applied to lay out the diagram when you choose the Layout > Do Full Layout command on the diagram's context menu or to lay out the selected diagram elements when you choose the Layout > Layout Selected Elements command on the context menu of the selected elements.

See Also