Creating elements in a diagram
Introduction
Two kinds of element can be created in Objecteering diagrams:
The icons used to create both boxes and links are presented in the
palette on the left of the diagram in the work view window. Like the explorer, certain icons have a
small black arrow at the bottom right-hand corner, indicating that they are part of an icon
group, which present a number of related icons in a
sub-palette. To view all the icons in
the group, simply click on the grouped icon and then slowly move the cursor to
the right while holding down the left mouse button.
When an element is created in a diagram, the explorer is automatically
updated to include the new element. Similarly,
if an element is modified or deleted in a diagram, it is also modified or
deleted in the explorer. In this way,
consistency is constantly maintained between the explorer and the work view
window.
In all UML 2 diagrams, if you try to create an element that is not
authorized (for example, if you try to create a package inside a class or an
association between a package and a class), the
icon appears, indicating that the creation operation
is not allowed.
Note: In UML 1.4 state diagrams, this "model expert" feature is not available.
Creating
a box element using an icon
To create a box element using an icon, carry out the following steps:
·
Click on the icon representing the type of element you
want to create.
·
Click in the diagram at the point where you want to
create the new element.
·
Enter the element's name in the highlighted zone.
The screenshot below shows an example of box element creation in a class
diagram.

Creating a
class in a class diagram
Steps:
1.
Click on the
"Create a class" icon.
2. Click in the drawing area at the point where you want the new class to appear.
3. Enter a name for the new class directly over the highlighted text zone.
Resizing
a new element during creation in a UML 2 diagram
In UML 2 diagrams, if you want to immediately resize your new element as
you are creating it, simply hold down the left mouse button when you click in
the diagram, and drag the mouse until the element is as big as you want it to
be.
Note: In UML 1.4 state diagrams, elements cannot be resized as they are being created.
Creating
a box element using the drag and drop feature
You can also create box elements in diagrams through the Objecteering
drag and drop feature.
The following screenshot shows an example of a class being dragged and
dropped from the explorer into a class diagram.

Creating a
class in a diagram by dragging and dropping it from the explorer
Steps:
You can simultaneously drag and drop several elements from the explorer
into a diagram. To do this, simply hold
down the "Ctrl" key, select all the elements to be dragged and
dropped, and then drag and drop them all into the diagram.
Creating
several elements of the same kind
Very often, you need to create several different occurrences of the same
kind of element, and for this Objecteering provides the repeat creation
mode. When this mode is active, you can
create as many elements of the same type as you wish, one after the other,
without having to click several times on the corresponding icon.
To activate the repeat creation mode, simply double-click on the icon
representing the type of element you want to create, and then click as many
times in the diagram as necessary. The
procedure is slightly different for grouped icons. You first have to select the required element
in the sub-palette, which will raise it to the top of the group, and then
double-click on it.
The repeat creation mode will remain active until you press ESCAPE or
select another command.
Creating
a link
To create a link, carry out the following steps:
·
Click on the icon representing the type of link you
want to create.
·
Click on the two elements you wish to link, first on
the origin element and then on the destination element.
·
A new link is created at the selected location.
The following screenshot shows an example of link creation in a class
diagram.

Creating an
association between two classes
Steps :
1.
Click on the
"Create an association" button.
2.
In the diagram, click on the origin class. When you are selecting the origin element for
a link, you will see
next to
your cursor arrow (with the "1" outlined to indicate that you are
about to select the first element to be linked).
3.
Click on the destination class. When you are selecting the destination
element for a link, you will see
next to your cursor arrow (with the
"2" outlined to indicate that you are about to select the second
element to be linked).
By default, links in UML 2 diagrams are created in orthogonal mode. For more information on the different drawing
modes for links, please see "Working with links".
Note: In UML 1.4 state diagrams, links are created by default in free mode.