4.1.2 Objects
Adding objects
To add an object in the Diagram Editor:
1) | Select
the desired object type from the object type toolbar or the Types
menu. |
 | If
you want to add several objects of the same type at the same time, hold down the
Ctrl key while selecting the object type from the toolbar. This will
enable sticky mode for object creation until a new type is selected or the right
mouse button is
pressed. |
2) | Move
the mouse cursor to the desired place in the drawing area and click the left
mouse button. If you have selected an abstract object type for creation, you
will be prompted for the concrete subtype at this
point. |
3) | An
empty property dialog opens allowing you to enter design information about the
selected object. Fill in the properties of the object and click
OK. |
There is also an alternative
way to create objects:
1) | Make
sure that no element is selected in the drawing
area. |
2) | Move
the mouse cursor to the place you want to create the
object. |
3) | Open
the pop-up menu by pressing the right mouse button and select Add
Object... from the
menu. |
4) | Select
the object type from the list that opens and then fill in the property dialog
and click OK. |
It is also possible
to add large objects by defining their areas:
1) | Select
the desired object type from the object toolbar or the Types
menu. |
2) | Move
the mouse cursor on the drawing area to the top left of the desired
area. |
3) | Press
and hold down the left mouse button, dragging the area for the object (there is
a preview visualization of the object filling the area) and release the mouse
button once the area you want has been defined. Holding down the Shift
key while dragging will maintain the object’s aspect ratio. Holding down
the Alt key will ensure that the dragging will honor the grid (having
both Shift and Alt down simultaneously cannot maintain both the
perfect aspect ratio and gridding in both x and y directions, so gridding is
only guaranteed in one
direction). |
4) | An
empty property dialog will prompt for the design information for the newly
created object. Enter the values and press
OK. |
 | Note
that Shift should be released after the mouse has stopped moving and before
releasing the mouse button. If Shift is still down when the mouse button is
released, it will be interpreted as an attempt to add an existing object: see
below. |
Adding existing objects
In many cases it is more practical to reuse design elements
that are already defined and stored in the repository, rather than creating new
elements. To add objects already defined elsewhere:
1) | Select
the desired object type from the object type toolbar or the Types
menu. |
2) | Move
the mouse cursor to the desired place in the drawing area and click the left
mouse button while holding down the Shift
key. |
3) | A
Component Selection Tool opens, initially allowing you to pick objects that are
already defined in the current graph, but also allowing you to navigate to any
object in the open projects.
|
| Objects
of the selected object type are shown with normal text, whereas other objects
are shown in italics. Please note that all objects listed with normal text are
not necessarily represented in the current diagram: they may be represented in a
matrix, a table, or in another diagram of the same graph (see Section 6.2.2). |
4) | Choose
the objects you need, and press OK (for more information about the
Component Selection Tool, see 3.3.2). |
5) | Move
the objects you added to a suitable
place. |
It is also possible to add
existing objects by selecting Add Existing Object... from the pop-up menu
that opens when you press the right mouse button over the drawing area with no
elements selected. Similarly, creating an object by dragging its area first
works also when adding an existing object.
If the object you wish to add is shown in the sidebar tree
view of this or another Diagram Editor, you can drag it from there to the
desired place on the diagram, creating a new representation there (and adding it
to this graph, if it was not already present).
 | Please
note that only those objects can be reused whose type is legal in the target
diagram. For example in a Data Flow Diagram you can only fetch processes,
stores, externals, or notes. Thus, if you select an incompatible graph such as a
Class Diagram, there will be no objects available from there for reuse in the
Data Flow Diagram.
|
Selecting objects
To select one object in the drawing area, move the mouse
cursor over it and click the left mouse button.
To select multiple objects, select the first object by
clicking it with the left mouse button, then hold Ctrl down while you
click each of the other objects. Alternatively, you can select all design
elements in an area by clicking and dragging with the left mouse button to
define the area you want to select. Elements wholly within the area will be
selected. Holding Ctrl down while selecting an area will toggle the
selection of elements within the area.
To select all elements in the drawing area (i.e. all
objects, relationships and roles), select Edit | Select All or use the
shortcut key Ctrl+A.
With multiple elements selected, it can be useful to be
able to filter the selection to leave only certain kinds of things selected:
just the objects without relationships, or just relationships of a certain type.
Edit | Filter Selection... (or
Ctrl+Shift+A) will do this, prompting you for the types to keep selected.
Subtypes of the selected types will remain selected too. E.g. in a
WatchApplication you could
Select All then
Filter Selection... to
just Variable, which will leave only instances of Variable and its VariableRef
subtype selected. This allows you to perform an operation on just those
elements, e.g. use
Format... to make them all 20% wider than the
default.
Editing objects
To edit the properties of an object:
1) | Double-click
the object in the drawing
area. |
Or: |
1) | Select
an
object. |
2) | Press
Enter or select Edit |
Properties.... |
Or: |
1) | Right-click
the object, which selects it and opens its pop-up
menu. |
2) | Select
Properties... from that
menu. |
 | By
default, the right mouse button first selects an element then opens the pop-up
menu for it. This can be changed to just open the pop-up menu. See Section 3.1.3 Options
Tool. |
As a result a property dialog
opens showing information about the selected object. Changes to the property
fields in the dialog will update information related to the selected object in
the repository and in all related tools representing the particular
object
. See Section
3.3.1 for more information on property
dialogs.
Moving objects
You can also move the objects around in the diagram. To do
this:
1) | Select
the object to be moved with the left mouse button and keep the button pressed.
|
2) | Drag the
object to a new location. While you are dragging, selection handles will be
hidden and the cursor will change. |
You
can also move objects using the cursor keys. Each key press will move the object
by one grid increment or by one pixel at 100% zoom if Shift is held
down.
To move multiple selected objects, click and drag in one
of the selected objects. Holding down Alt while moving extends the
operation to also move the objects contained by the selection.
Scaling object symbols and aligning them to the grid is
described at the end of Section
4.1.6.
Deleting objects
To remove an object:
1) | Select
it with the left mouse button and press the Delete key (or select Edit
| Delete or press the Delete button in the
toolbar). |
Or: |
1) | Select
and open the pop-up menu for the
object. |
2) | Choose
Delete from the menu. |
As a result
of the operation the object disappears from the diagram. The roles of any
relationships it was involved in will also be deleted; if any relationship is
left with fewer than two roles as a result, the relationship and remaining roles
will also be deleted. If the object representation deleted was the last
representation of that object in this graph, the object may also be removed from
the conceptual graph. This depends on the current deletion policy, which you can
choose in the Options Tool (see Section
3.1.3).
Replacing objects
To open the Replace Tool for an object or set of objects in
the Diagram Editor:
1) | Select
the objects to be
replaced. |
2) | Select
Replace... from the pop-up menu or select Edit |
Replace.... |
3) | A
Replace Tool will open. |
For more
information about the Replace Tool, see Section
3.3.5.