Viewing Diagrams

Viewing a single diagram is easy. You simply select the diagram 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 5-5. 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.

The 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 5-6. 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 5-7. Properties tab with operation 'Member' selected.

Take an even closer look at the parameters of Member. The parameters have properties themselves and therefore 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 by default is set to void. 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.

Navigation

Poseidon was designed to accelerate and simplify the modeling process, and therefore offers many ways to move around within a model. Some users prefer using a mouse, others work more quickly with a keyboard. Some users spend more time in the Details pane, while others spend more time in the diagrams themselves. Regardless, all users need different ways to efficiently find what they are looking for.

Navigation Pane

The Navigation pane in the upper left corner presents the elements of the model in various views. Each view contains a different organizational structure, represented as a tree of model elements. The root node of the tree is always the model itself.

Model elements are available for closer inspection by clicking on the name or symbol of the element. The properties of the selected element are then displayed in the Details pane, located in the lower right section of the application. If the element appears in the diagram that is currently displayed in the Diagram pane, the element will also become the currently selected element within the diagram. Should a diagram be the selected element, that diagram will open in the Diagram pane.

This selection/activation interaction goes both ways. That is, if an element is selected from within the Diagram pane, it is likewise selected in the Navigation pane.

You can also move from a selected element to diagrams belonging to that element with the quick-key Ctrl-Alt-g. If the selected element has more than one diagram, the 'Go To Diagram...' dialog appears. You can then use the mouse or cursor keys and Enter button to select the desired diagram.

Details Pane

The Details pane contains numerous tabs, and it is the Properties tab that provides the means for drill-down navigation. Each element contains or is a part of other elements, as an operation is both a part of a class and contains parameters, for example. Moving between these elements is as simple as double-clicking on the name of the element in the tab.

Also available are the up, down, and back buttons, which move you through the hierarchy of the elements.

Diagram Pane

The easiest way to navigate between elements within in the Diagram pane is to simply click on any element.

But what about moving between the diagrams themselves? Easy. Open the 'Go To Diagram...' dialog by pressing Ctrl-g. In the dialog, you can use the arrow keys to move around. The space bar switches the diagram that appears in the background, and Enter selects the diagram and exits the dialog.

If an element contains diagrams (a package for example), a rapid button takes you to the elements sub-diagram(s).

The quick-key Ctrl-Alt-G will also do this, and if an element has multiple diagrams, it will open a dialog with the list of available diagrams.

Moving About Within a Diagram

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 5-8. 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 5-9. 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).

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.

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.