Introducing the Work Area

The work area of Poseidon is separated in five parts. At the top of the window, there is a main menu and a toolbar that provide access to the main functions. Below this are four panes:

Figure 6-1. Poseidon for UML application work area.

Diagram Pane

Navigation Pane

Overview Pane

Details Pane

You can hide and redisplay panes by clicking on the small arrows that are located on the separation bars between panes, much in the same way you can manipulate panes in most other GUI applications. This allows you to gain extra room for drawing in the Diagram pane while the other panes are not needed. You can also resize the panes to best fit your needs by moving the separation bars with the mouse.

The Navigation Pane

The first pane we will explore is the Navigation pane in the upper left corner. It is used to access all of the main parts of a model by presenting the elements of the model in various tree structures. There are many different ways the model information could be organized into a tree structure; for example, the tree could be sorted alphabetically by element name, by diagram name, or by model element type. The classic way to organize them is by packages. Poseidon for UML uses the package structure as the default navigation tree, as do most UML tools. But, as we will see a little later, Poseidon provides a set of ways to structure this tree — these tree structures are called views. This is one of the strong points of Poseidon for UML, providing enormous flexibility for navigation. The default view is called the Package Centric view.

The root node of the tree is the model itself, in our example it is called Softsale. The first level of the tree is open by default. In the Package Centric view, all first-level packages are shown, as well as all model elements that are not inside a specific package. As you can see, each element in the tree is preceded by a little icon. Element icons have one symbol, diagrams have several of these symbols combined into one icon. These icons are used consistently throughout the application.

Some sample icons:

You can navigate through the tree by clicking on the icon in front of an element name, similar to many other applications. Any element you subsequently add to the model will automatically appear in the corresponding branch of the tree hierarchy, no matter how it is created.

Right now, your Navigation pane should look like this:

Figure 6-2. Navigation Pane in the Softsale model.

The model Softsale contains several packages ( clients, ordering, products, boni and java) as well as a number of diagrams ( packageOverview, mainClassesOverview, ...).

Select the class diagram packageOverview by clicking on it in the Navigation pane. The selected diagram will then be displayed in the Diagram pane, which is located to the right of the Navigation Pane. The packageOverview diagram (Figure 6–3) visualizes the dependencies between the included packages: clients, ordering, products, test and boni.

Figure 6-3. Class Diagram 'packageOverview'

Inside the packages you can find further diagrams, but to quickly browse through the existing diagrams you need not navigate through the packages themselves. You can find diagrams directly (and much more quickly) using the diagram tree.

Changing the Navigation View

At the top of the Navigation pane, there is a drop-down selection box. Select the Diagram Centric view.

Figure 6-4. Selecting a New Navigation View

Now your Navigation pane should look like this:

Figure 6-5. The Navigation Pane in a Diagram Centric view.

This view sorts the model elements according to the diagrams in which they are included. Of course, this view includes only includes those model elements that are included in at least one diagram. The organization of this view has the advantage of quick navigation to any diagram or to the elements they contain. It logically follows that sometimes the Diagram Centric view and at other times the Package Centric view is more useful.

Opening Multiple Navigation Panes

To give you several choices of views at one time, you can create multiple instances of the Navigation pane by creating additional tabs. The different Navigation panes are then accessible through these tabs and it is then possible to select different views in each.

To open additional Navigation panes:

  1. Click on the folder icon (called the 'duplicate tab') that is located to the right of the drop-down selection box.

  2. A new navigation view will be created behind the current view.

  3. Now you can select the Package Centric view from the dropdown menu of one tab and the Diagram Centric view in the other tab. We will frequently need both views in the rest of the guided tour.

Figure 6-6. Add a Navigation View Tab

You can delete the navigation view tabs using the delete button which appears on the tab, next to the name of the view, whenever the mouse is placed there and two or more tabs are present.

Figure 6-7. Delete a Navigation View Tab

Take a few minutes now to familiarize yourself with some of the other available views.

We will now turn our attention to the diagrams themselves and how to edit them by looking at the Diagram Pane.

The Diagram Pane

Open the diagram mainClassesOverview in the Diagram pane by clicking on its name in the Navigation pane. Expand the tree for this diagram by clicking the 'expand tree' icon that appears to the left of the diagram name.

The Diagram pane to the right should now look like this:

Figure 6-8. The Diagram pane with the class diagram mainClassesOverview.

This is an overview diagram which provides a high level view on the primary classes of our example. The classes from this diagram happen to be located in different packages. You can see the package name in parentheses under the class name (e.g. (from clients)). For each package in this example, there is another diagram you can view that shows the classes of that package and how they relate to each other. In UML, model elements can be represented in different diagrams to highlight specific aspects in different contexts. Other diagrams covered later in this guide will give us another perspective.

This diagram shows the most important classes of our example model. It already tells you quite a bit about this example:

If you select one of these classes in the navigation tree, you will see that the corresponding class is also selected in the diagram. Similarly, if you select a class in the diagram it is also selected in the Navigation pane. This is true for all elements: your selection is synchronized between the different panes.

Try it for yourself by selecting one of the classes in this diagram from the Navigation pane. Notice how the class name is highlighted in the Navigation pane, while the Diagram pane displays the same class with its rapid buttons visible around it.

The Details Pane

So let's now take a closer look at the frame at the bottom, the Details pane. Select the class Client by either clicking on the class itself in the diagram or clicking on the class Client within the package clients in the Navigation pane.

Figure 6-9. The Details Pane with class Client selected.

The Details pane is composed of a number of different tabs. These tabs (sometimes referred to as panels) display all of the detailed information about the element currently selected, allow changes to be made to these elements, add related elements, or delete the element all together. Properties can be changed, documentation can be written, the resulting code can be previewed and edited, and more. The tabs always reflect the currently selected model element and are enabled only if they make sense in the context of the selected element. The Details pane also serves as another mechanism to navigate through the model.

Tabs available in the Details pane:

The Overview Pane

The Overview pane at the bottom left provides access to two tabs. First of the two is the 'Birdview' tab, which displays a bird's-eye view of the diagram currently displayed in the Diagram pane and allows you to zoom and/or pan in either the Diagram pane or the Overview pane.

Figure 6-10. Class diagram as seen in the Birdview Tab

To directly scale the section displayed in the main diagram area, enable the checkbox in the lower left-hand corner. To pan and zoom the diagram in the Birdview tab, disable this checkbox.

Figure 6-11. Critiques of the Softsale example in the ByPriority Tab

Click on the tab called 'ByPriority'. This tab contains a collection of critiques that have been compiled by Poseidon. This is a feature that originates from ArgoUML and was one of the motivations for Jason Robbins to start the project. It is a powerful auditing mechanism that discretely generates critiques about the model you are building. Critiques can be hints to improve your model, reminders that your model is incomplete in some areas, or errors that would cause generated code to not compile.