Diagram Pane

The Diagram Pane is the area used to do most of the diagram creation and modification. It is generally the largest pane.

This section covers some of the functions available from the diagram pane, as well as changing the settings of this pane. Chapter 7, 'Working with Diagrams', provides a more extensive look at all of the functions available. Chapter 9, titled 'A Walk Through the Diagrams', contains detailed information about the diagrams themselves.

Open Diagrams

All existing diagrams are listed in the Navigation pane. To open one of these diagrams, simply click on the name of the diagram. The diagram will open in its own tab in the diagram pane to the right.

The number of diagrams which can be open at one time is set to 5 by default. This number can be changed in the Appearance tab of the Settings dialog. Unchecking the 'max number of tabs' box removes any limits to the number of tabs.Include reference to Ctrl-Alt-G

Remove Tabs

To remove the a tab from the Diagram pane, move the mouse over the tab to be deleted. A 'delete' button with an 'X' will appear. Click the button and the tab will be removed from the pane.

Create Diagrams

There are two ways to create a new diagram. The first is through the main toolbar. Simply click one of the create diagram buttons. The new diagram will be placed in the navigation tree to the left. Where it is placed depends on what was selected in the Navigation pane prior to the creation of the new diagram. By default, new diagrams are placed in the top level of the model, which can be easily seen in the package centric view. A diagram can be created elsewhere by first selecting the package in which it should be placed, then clicking the create button.

An alternative to the create buttons on the main toolbar is the create diagram menu from the main menu. All of the items available in this menu also have quick-keys assigned to them.

Edit Diagrams

Of course, central to any model is the collection of diagrams. They provide a means to communicate ideas to the viewer in a format which is easily comprehensible. And as they are responsible for clearly relating important aspects of the system, they must also be completely accurate. Poseidon makes it easy to modify the diagrams as the model progresses in development.

Adding Elements

There are two methods for placing new elements within a diagram: through the Diagram pane toolbar and through the rapid buttons. The toolbar contains miniature representations of all of the elements available in that particular diagram. Adding elements to a diagram in this manner is very straightforward, simply click on the element in the toolbar and then click in the diagram workspace. Creating elements through the rapid buttons is not only quick (as the name implies), but also has the advantage of creating a relationship to the new element from this one step.

Editing Elements

Perhaps the simplest way to edit an element is to edit it directly in the diagram. This is known as Inline Editing. Double-click on the aspect of the element that you would like to change, and the characteristic will be editable in a text box.

You can also edit an element in the Diagram pane through the context menus. Right-click on the element or characteristic to display the context menu to see what is editable from this menu for the particular element.

Some characteristics, however, are available for editing only from the Details pane. Open the Details pane for an element by selecting it from the Diagram pane or the Navigation pane. Navigate to the desired characteristic (such as a return type for a class operation) by double-clicking on the characteristic in the left side of the Properties tab. Some of the characteristics may require navigating through several layers of characteristics. The Properties tab also provides navigation buttons which function similar to a web browser.

Change Properties of the Diagram Pane

Grid Settings

The first thing you may notice about the Diagram Pane is the grid that is drawn over the drawing area. By default, the drawing area displays this grid. The visible grid is only a collection of lines, they have no functions of their own.

A second grid, called the snap grid, is invisible to the user. When this option is enabled, diagram elements align themselves along the intersections of this grid which are closest to the element (in a process called snapping) to aid with element positioning.

To make elements snap to the visible grid, set the visible and snap grids to be the same size. The settings shown in Figure 10–1 will have the visible grid drawn every 20 pixels, and the elements will be able to snap to intermediate positions of the visible grid.

You can change the properties of both grids from the Grid Settings dialog in View-Adjust Grid...

Figure 8-1. Grid Settings dialog

Grid Settings

  • Visible - Determines whether the visible grid is drawn at all.

    Spacing and line appearance are also set for the visible grid here.

  • Snap - Determines whether the elements placed in the diagram will be forced to align to a snap grid.

    The pixel dropdown sets the spacing of the snap grid.

Other Settings

The grid is not the only setting that can be changed for the Diagram pane.

  • Display/Hide Tabs - Hide or redisplay diagram tabs at the top of the pane with the Appearance Tab in the Settings Dialog.

  • Number of Tabs Displayed - Set the maximum number of tabs with the Settings Dialog, Appearance Tab.

  • Display/Hide Information About Elements - Hide or redisplay information such as operations or attributes from the Settings Dialog, Diagram Display Tab.

  • Resize the Drawing Area - Drag the pane separation bars to the desired size. The arrows on the bars open and close the panes completely.

  • Enlarge/Reduce the Diagram - Change the zoom factor in the Properties tab for the diagram or hold the Ctrl key while turning the mouse wheel.