Poseidon for UML: User Guide
Prev | Chapter 11. Using Diagrams | Next

# 11.3. Viewing Diagrams

Viewing a single diagram is easy. You simply select the diagraLm you wish to view from the Navigation pane and the chosen diagram is then displayed in the Diagram pane. Much more interesting are the relationships between elements and how specific elements are represented in different diagrams. Each element contributes to the overall picture of the model. It may occur in only one diagram, or it may be repeated throughout many diagrams, or perhaps it does not appear in any diagrams at all. The element remains constant throughout the model, with the same characteristics and properties. The only differences it may have from one diagram to another are in the way it is rendered, such as color and compartment visibility.

The yellow field behind the diagram elements indicates the actual size of the diagram. This is important when printing or exporting graphics. The size and shape of this field will change automatically when moving or adding elements.

Select individual classes or associations in a diagram by single-clicking on them. Note how they are simultaneously selected in the Navigation and Details panes.

Hovering with the mouse over any element in the Diagram pane will display the beginning of any documentation that has been entered for that element.

Figure 11-1. Tooltip displaying documentation

The model can be changed directly from the diagram. For example, double-click on the class name of any class in a class diagram. The text field now slightly changes its look and becomes editable. Changing the class name here perpetuates the name in the model everywhere this model element is used. Most name fields accept multiline text; therefore, the Enter key will add a newline. To commit a change to such a field, use Ctrl-Enter in place of Enter, or simply click elsewhere in the application.

You can also select and change attributes or operations. You need to be aware, though, that in this case you are not simply editing an ordinary text field, you are editing text rendered from a number of model elements. As such, your changes will be propagated throughout the model. Poseidon for UML provides quite powerful parsers that allow you to change these directly by changing the text lines. This is referred to as in-place editing. If you are familiar with the notation used in UML, you can edit almost all of these directly in place.

Though most textual elements can be edited directly in place, another option for elements that are not so easily edited in the diagram is to use context-sensitive menus, which you call up by means of a right-click. In associations, for example, most elements are changeable through Context menus.

There are, however, some details that can conceptually not be changed in place or where it makes more sense to provide a special graphical user interface. It is for these purposes that the Details pane is used.

## 11.3.1. Details Pane

To explore the facets of the diagram, you can select elements with the select tool and delve deeper into them. Each time you make a new selection in a diagram, the Details pane (bottom right) is updated and shows specific information for the selected element, as has been previously mentioned. Within this pane, the Properties tab will be selected by default. It contains all relevant details of the selected model element and also displays links to other directly related model elements.

The Properties tab of Poseidon for UML has some similarities with an internet browser. And in a way, a UML model is very similar to hypertext. It is highly connected and navigation between the connected elements is important. All relations to other model elements function as a link to the corresponding Properties tab. Like a browser, this navigation has a history that can be accessed using the forward and back buttons. Since a model is also hierarchical, there is an up button to access the element at the next higher level. For a class this could be the package or namespace to which it belongs, for example.

Figure 11-2. Properties tab displaying class 'Reservation'

Open the diagram 'Component Model Overview' and select the class 'Reservation'. Take a look at some of the fields, like `Associations` , `Operations` and `Attributes` . All entries in these text fields work like links in hypertext, which means that clicking on these links allows you to navigate to the related model elements. You can navigate from one class to its associations, operations or attributes and easily access their properties too. Of course, this kind of navigation works in both directions: e.g. from a class to its operations and back.

Now let's move to one of the operations of this class. Click the `Member` operation and have a look at its properties.

Figure 11-3. Properties tab with operation 'Member' selected.

Take an even closer look at the parameters of `Member` . The parameters have properties themselve; therefore, they have their own Properties tab, too.

Click on the parameter `return` . The UML specification treats return types as special parameters; thus, every operation has a return parameter that set to `void` by default. This type can be changed to any other type.

You should now be able to comfortably navigate through the model with the up, back, and forward buttons of the Properties tab toolbar, which is again similar to a hypertext browser.

## 11.3.2. Zooming

The zoom factor is a property of the diagram. Your diagrams might get too large to fit completely into the visible part of the screen. In this case you will want to zoom out to get a better overview. Or you might want to zoom in on some specific part of a model to increase readability, for example during a presentation using a projector.

There are several ways to zoom in and out:

- Change the zoom factor of a diagram by clicking on an empty space in the diagram and using the slider (or the buttons with predefined zoom values) on the Properties tab in the Details pane.

  Figure 11-4. Zooming by changing the properties of a diagram.

- Use the slider in the Birdview tab of the Overview pane. The checkbox indicates which pane is affected - unchecked means the birdview can be zoomed, checked means the diagram in the Diagram pane can be zoomed.

  Figure 11-5. Zooming from the Birdview tab

- Hold down the Ctrl key and use the mouse wheel to zoom in and out.

- Choose a zoom factor from the menu ( View | Zoom ).

## 11.3.3. Scrolling

As diagrams get bigger and bigger, the scroll bars become more and more useful.

You can use Shift and the mousewheel to scroll horizontally through a diagram as well.

## 11.3.4. Birdview Tab

The Birdview tab displays an overview of the entire diagram. The portion of the diagram visible in the Diagram pane is highlighted and has blue handles around the edges. You can redisplay parts of the diagram by dragging the highlight box over different areas of the diagram.

Prev | Home | Next
Opening Diagrams | Up | Editing Diagrams