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. 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. The model can be changed directly from the diagram. For example, double-click on the class name of class Client in the diagram itself. The text field now slightly changes its look and becomes editable, but use caution as the entire field is highlighted and it is possible at this point to overwrite the entire field (this is similar to selecting and changing a file name in Windows). Changing the class name here perpetuates the name in the model everywhere this model element is used.

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. For 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 probe 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 also an up button to access the element at the next higher level. For a class this is the package or namespace to which it belongs, for example.

Figure 7-10. Properties tab displaying class Client

Open the class Client and take a look at some of the fields, like Associations, Operations and Attributes. All entries in these text fields work like links in a hypertext. That means that these links allow you to navigate to the related model elements. Thus 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 us navigate to one of the operations of this class. Click the checkPassword operation and have a look at its properties.

Figure 7-11. Properties tab with checkPassword Selected.

Take an even closer look at the parameters of checkPassword. 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. Notice here, though, the return type of checkPassword is set to boolean.

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.

Opening a Tab from the Details Pane in a Separate Window

Screen space is valuable real estate, and this is especially true when working with large diagrams. Space for diagrams can be increased by closing or shrinking the Details pane, but this is not really practical when you need to access that information often. Poseidon allows you to open tabs from the Details pane in separate windows, freeing up screen space.

To open a tab in a new window, double-click on the name of the tab. The new window will open on top of Poseidon.

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: