11.2. Mouse Behavior in the Editing Pane

Behavior of the mouse in general, and the naming of the buttons is covered in the chapter on the overall user interface (see Chapter 7, Introduction).

11.2.1. Button 1 Click

In the tool bar of the editing pane, button 1 click is used to select a tool for creating a new artifact and adding it to the diagram (see double clicking for creating multiple artifacts). For most tools, adding a new artifact to the diagram is achieved by moving the mouse into the editing area and clicking again.

In the main editing area button 1 click is used to select an individual artifact.

Many artifacts (e.g. actor, class) show special handles when selected and the mouse hovers over them. These are called “Selection Action Buttons”, see Section 11.5, “Selection Action Buttons”. They appear at the sides, top and bottom, and indicate a relationship type. Clicking on a Selection Action Button creates a new related artifact, with the relation of the type that was indicated. If the shift key is pressed when hovering the mouse over a selected artifact, sometimes different handles are shown, which stand for different relation types.

Where button 2 click has been used to bring up a context sensitive pop-up menu (see below), button 1 click is used to select the menu entry required. The pop-up menu will be removed by any button 1 click outside of the menu area.

There are various more detailed effects, which are discussed under the descriptions of the various tools (see Section 11.3, “The tool bar”).

11.2.2. Button 1 Double Click

When used on the tool bar with a tool to add an artifact, the selected artifact will be added multiple times to the drawing area, once for each further button click, until the tool is again selected or another tool chosen.

When used within the drawing area on an artifact that has sub-components, double click will select the sub-component for editing (creating it if necessary).

For example double clicking over an operation compartment of a class will select the operation. Or create one if there is none yet.

A special use is with package artifacts on the class diagram. A double click on a package will navigate to the class diagram associated with a package (the first created if there is more than one), or will offer to create one for you if there is none. See Figure 11.2, “The dialog for adding a new class diagram”

Figure 11.2. The dialog for adding a new class diagram

The dialog for adding a new class diagram

11.2.3. Button 1 Motion

Where the artifact being added is some form of connector its termination point is shown with button 1 up over the terminating artifact. button 1 click may be used in the space between artifacts to create articulation points in the connector. This is particularly useful where connectors must loopback on themselves.

Over graphical artifacts button 1 motion will move the artifact to a new position.

Graphical artifacts that are selected show handles at the corners or ends, and these can be used for re-sizing.

Some artifacts (e.g. actor, class) show special handles (called “Selection Action Buttons”, see Section 11.5, “Selection Action Buttons”) at the sides, top and bottom, which can be dragged to form types of relationship with other artifacts.

Where the artifact is some form of connector between other items, button 1 motion other than at a handle will cause a new handle to be created, allowing the connector to be articulated at that point. This only works when the connecting line is not straight angled. Such new handles can be removed by moving them to the end of the connector.

There are various more detailed effects, which are discussed under the descriptions of the various tools (see Section 11.3, “The tool bar”).

11.2.4. Shift and Control with Button 1

Where multiple selections are to be made, the CTRL key is used with button 1 to add unselected artifacts to the current selection. Where an artifact is already selected, it is removed from the current selection.

Clicking Button 1 while the SHIFT key is pressed, invokes the broom tool, which causes the selected artifacts (and any others swept up with them) to be moved with the broom tool (see Section 11.3.1, “Layout Tools”).

11.2.5. Alt with Button 1 motion

Button 1 down anywhere in the diagram while the ALT key is pressed, allows to scroll the canvas in all directions with button 1 motion.

11.2.6. Button 2 Actions

When used over artifacts in the the editing pane, this will display a context dependent pop-up menu. Menu entries are highlighted (but not selected) and sub-menus exposed by subsequent mouse motion (without any buttons). Menu entry selection is with button 1 or button 2. See Section 11.9, “Pop-Up Menus” for details of the specific pop-up menus.

In case multiple elements are selected, the pop-up menu only appears if all the items are of the same kind. In this case, the functions apply to all selected elements.

11.2.7. Button 2 Double Click

This has no effect other than that of button 2 single click.

11.2.8. Button 2 Motion

This is used to select items in a context sensitive menu popped up by use of button 2 click.