Collapsing and Expanding Container Elements

Managing the visibility of complex diagrams is crucial, and the collapsible container elements feature is a powerful way to handle this. This tutorial will guide you through the process of collapsing and expanding container elements (such as UML packages) and discuss scenarios where this feature is particularly useful.

How to Collapse a Container Element

Collapsing a container element in Software Ideas Modeler simplifies the view of your diagram by reducing the container to its header. This hides all nested elements, making the diagram cleaner and easier to navigate. Here’s how to do it:

  • Select the Container Element: In the diagram editor, click on the container element you want to collapse. This could be a UML package, a class, or any other container element.
  • Use the Collapse Button: Look for the "Collapse" button in the context bar, which appears near the top of the screen when an element is selected. Click this button to collapse the container.
  • Alternatively, Use the Context Menu: Right-click on the container element. In the context menu that appears, hover over or click on the "Collapsed" menu item to select it. If the action is successful, the container will shrink to display only its header.

How to Expand a Collapsed Container Element

Once a container is collapsed, you might need to expand it to view its contents again. Here’s how to expand a collapsed container:

  • Select the Collapsed Container: Click on the collapsed container in your diagram. The container should display its name in a minimized header form.
  • Use the Expand Button: With the container selected, click the "Expand" button in the context bar. This will restore the container to its original size and make all nested elements visible again.
  • Use the Context Menu: You can also right-click on the collapsed container. If the container is already collapsed, the "Collapsed" menu item in the context menu will be checked. Click on it to uncheck and expand the container.
Collapse and Expand Container
Collapse and Expand Container

Remembering and Adjusting Container Sizes

When you adjust the size of a container element in its expanded or collapsed state, Software Ideas Modeler remembers these adjustments. This means that each state maintains its size independently of the other:

  • Adjust Expanded Size: When a container is in its expanded form, you can resize it to better fit its contents or the available diagram space. Resize by clicking and dragging the edges or corners of the container.
  • Adjust Collapsed Size: Similarly, when the container is collapsed, you can adjust its size, typically making it compact enough to be unobtrusive yet legible. Resize the collapsed container in the same manner.
  • Switching Between States: After adjusting, whenever you collapse or expand the container, the software will recall and apply the last size set for each respective state. This preservation of size remains consistent through multiple collapse and expand cycles and even after closing and reopening the model.

Practical Applications Where Collapsing and Expanding is Useful

  • Project Presentations: During presentations, you can quickly toggle between different levels of detail. Show a high-level overview by presenting all containers in a collapsed state, then expand as needed to dive into details.
  • Documentation: When documenting systems, it might be beneficial to include both collapsed and expanded views of the same areas to provide both summary and detailed information without cluttering the workspace.

Applicable Elements

This feature is not limited to a single type of container but can be used across a variety of elements in different diagram types. Here are some examples of where you can use this feature:

  • Composite Classes and Packages in UML Diagrams: Perfect for managing large class diagrams where packages can be expanded to show detailed classes and relationships or collapsed to a summary view.
  • Composite States in UML State Machine Diagrams: Useful in complex state machines to focus on higher-level states without getting lost in the details of sub-states.
  • Container Elements in Block Diagrams - Collapse and expand nested blocks on various levels of nesting.
  • User Interface Diagrams - For UI flow diagrams or wireframes, manage the space by collapsing elements like group boxes or panels, which are not currently the focus.

New Comment

Comment