Chapter 3: Working with Projects
Each UMLStudio document represents a project. Project files have a .pro ending (e.g., Mail.pro).
Opening (or double-clicking) a project file from the Windows Explorer causes UMLStudio to be launched
and the project loaded.
A project file contains the following:
- A reference to the template on which the project is based. Note that the project template is a
separate file; it is not contained by the project, but simply referenced by it. This makes it easy
to have the project use a different template at a later stage (i.e., to switch the project notation).
- A set of user-created models. These models are expressed in the notation provided by the project
template. Models are typically organized as hierarchies.
- References to the code/documentation/other files generated by UMLStudio for the project.
Project files give you considerable flexibility in organizing your work. For example, if you’re working
on a new software product and you need to produce business models, architectural design models, object
models, etc., you might choose to create all these within the same project file, or to have a separate
project file for each category. Your choice should be driven by the following considerations:
- The size and complexity of the product.
- The number of development staff who will be working with these projects.
- The requirements for revising, publishing, and distributing these projects.
Using many smaller projects than one or two large ones provides you with these advantages:
- You will be able to use more templates and, therefore, a larger variety of notations.
- It will be easier to divide and distribute the work.
However, larger projects have their merits too, and may prove more convenient and effective for smaller
product development efforts.
This will display a dialog box that lists the available notation templates to choose from.
Choose the notation you want the project to use and press OK.
A new project is created based on the selected notation template.
The project will be initially empty, except for a blank top-level model called Untitled.
This will display the standard Windows dialog for opening a file.
Browse to the project you want to open, select its file, and press OK.
- You must have access to UMLServer.
- Choose File:Repository:Browse
- Browse to the project or the project version you want, select it, and press the Check Out button.
You should check out the project as Read Only if you simply want to view it.
This will display a dialog for specifying the check-in parameters.
If the project is new (i.e., no version of the project exists in the repository), then you will
be asked to nominate a location for it. Otherwise, UMLServer will automatically
identify the correct location.
A model is an abstraction of a concept. For example, a design model is an abstract representation of a
design idea. Models are represented as drawings. For example, a software design model may be represented
by a class diagram.
There are two types of models in UMLStudio:
- Tool models which visualize the design of a notation symbol (e.g., a class symbol in UML).
Tool models are created using primitives (e.g., lines, polygons, text boxes) only. For example,
a UML inheritance tool model looks like this:
- Custom models which are of a specific diagram type (e.g., class diagram) and
created by the user using a given notation (e.g., UML). Custom models are created using the
places and links supported by the diagram type
(e.g., classes, inheritance) and primitives
(e.g., lines, boxes). For example, a UML class model looks like this:
The custom models (or simply models) that you create in a project are typically organized hierarchically.
UMLStudio allows you to
have any number of model hierarchies within the same project. Each hierarchy is denoted by a root-level
model which denotes the root of the hierarchy. Root-level models appear directly inside the Models folder
in the explorer pane.
A root-level model may contain submodels, which in turn may contain other submodels, etc. The same submodel
may appear in a number of hierarchies. In fact, the same submodel may be referenced from a number of
places within the same hierarchy (implying that model hierarchies are not strictly hierarchies, but more
like graphs).
Each submodel is permanently attached to a master. The submodel provides
a refinement of the master.
Masters are in turn referenced by places. Each place has a master. Two or more places that have the same
type and name and namespace, refer to the same master.
These relationships are illustrated by the following diagram, which shows two places having the same
submodel, denoted by a common master.
UMLStudio imposes no limit on the number of model hierarchies or the depth of each hierarchy.
- Select the model icon in the explorer pane.
The model is immediately displayed in the drawing pane and becomes the current model.
This will display a dialog box that lists the available diagram types to choose from.
Once a diagram type is selected, a new model of that type is created, added to the Models
folder in the explorer pane, and selected as the current model. A new model is initially named
Untitled-n (e.g., Untitled 1, Untitled 2, etc.), but can be renamed using the model
property sheet.
This will display a dialog box that lists the available diagram types to choose from.
Once a diagram type is selected, a submodel of that type is created, inserted in the explorer pane as a
child of the current model, and immediately selected as the current model. The submodel is initially
named after the place, but can be renamed using the model
property sheet.
A submodel is actually attached to the place master (not the place itself). Therefore, two or more
places of the same type and name will point to the same submodel because they all share the same master.
Applying the Model:Explode
command to a place that already has a submodel will simply cause the submodel
to become the current model. To get back from a submodel to the parent model, choose
Model:Implode (or hold down the control key and click in
a blank area of the drawing pane, or select the parent model in the explorer pane).
Tip: A handy shortcut for Model:Explode
is to double-click a place while holding down the control key.
Tip: If the View:Show Hyper Links
option is ticked, a small yellow box appears at the
bottom-right corner of places that have submodels. Clicking the mouse pointer on this box is a quick way
of viewing the submodel.
- Select a model in the explorer pane by clicking on it.
- To move the model up by one position, choose Model:Move Up.
- To move the model down by one position, choose Model:Move Down.
Note the only user-defined models in the Models folder can be re-ordered.
The order of the tool models is fixed and unchangeable.
Bring up the model’s property sheet. You can do this in two ways:
- Select the model in the explorer and then choose Edit:Properties, or
- Double-click the model icon in the explorer pane.
Make your changes and press the OK button.
You can do this in three ways:
- By using the scrollbars in the drawing pane to scroll to the desired position.
If you drag a drawable/knob to outside the drawing pane view, the pane will automatically scroll
in order to bring your current position within view.
- By making sure that no drawables are selected and pressing the arrow keys to move in left, right, up,
down directions, or by pressing the Page Up/Page Down keys to move up/down a screen at a time.
- By dragging the red rectangle in the Locater Page.
Tip: If you want to pan to one or more selected drawables, choose
View:Pan to Selected.
Do any one of the following:
The permissible zoom range is 20% - 400%.
- Make sure the model is the current model (i.e., selected in the explorer pane).
- Select the matrix page in the info pane.
- Adjust the matrix dimensions by clicking or dragging in the pane.
A new model’s size defaults to a single page (i.e., a 1×1 matrix). You can increase this size by changing
the matrix dimensions. For example, a 2×3 matrix will give you 6 pages arranged in 2 rows and 3 columns.
- Select the model in the explorer pane.
- Choose Edit:Delete or press the Delete key.
Deleting a model will delete all its direct/indirect submodels as well.
- Select the model you want to move.
- Choose Edit:Copy if you want to just move a copy, or
Edit:Cut otherwise.
- Go to the project to which you want to move the model.
- Choose Edit:Paste there.
Copying does not affect the copied model. Cutting is equivalent to copying the model and then deleting
the original.
Moving a model will move all its direct/indirect submodels as well.
- Choose Edit:Find
(if you just want to search for a string) or Edit:Replace
(if you want to also replace strings). This will show a tabbed dialog box.
- Enter the search/replace strings in the Search Criteria page.
- Press the appropriate search/replace button.
If you’re searching for or replacing a single occurrence, UMLStudio will automatically browse to the
matched drawable (if any). Otherwise, a list of matches will appear in the Match List tab of the dialog
box. Double-click an item in the list to browse to it.
- Choose File:Print. This will display a print dialog box.
- Select appropriate options from the dialog box and press the OK button.
- Select the model you want in the project tree, then click in the drawing pane.
If you only need certain drawables in the model, select those drawables.
- Choose File:Save Image. This will display a save dialog box.
- Select appropriate options from the dialog box and press the OK button.
- Include the saved image file in your document.
Alternatively, you can include a picture of a model (or its drawables) as an enhanced metafile, and
without creating an image file.
To do this, select the model/drawables you want, choose Edit:Copy,
go to the target document, and do Edit:Paste.
- If you want to only affect some of the classes in the model, select those classes.
To affect all classes in the model, select nothing.
- Choose Looks:Annotation. This will display an annotation
dialog box.
- Select appropriate options from the dialog box and press the OK button.
A place is a visual representation of a master, which in turn represents an entity or object.
For example, given a master called Customer which represents a customer class, we can have a place that is
drawn as a box that represents the master:
In any given project, a master is always unique. However, there can be multiple places representing the same master.
For example, the Customer place above can appear many times in the same project (or even in the same model).
All these places, however, refer to the same unique Customer master.
The uniqueness of a master is determined by a combination of three things:
- The master’s kind (i.e., the tool with which it is created)
- The master’s name
- The master’s namespace (see below) which is optional and may be empty
For example, a UML package called Customer is distinct from a UML class called Customer,
and two UML classes called Customer are distinct if they have different namespaces.
Each master uses a reference count to keep track of how many places refer to it.
When a brand new place is created, a master is implicitly created for it and its reference count is set to 1.
When another such place is created, this reference count is incremented. When
an existing place is deleted, its master’s reference count is decremented. If a master’s reference count drops to zero,
it is usually deleted.
A place with Class semantics can represent either a master (as a type) or an instance of the master. The UML convention is used
to distinguish an instance. Given a master name (e.g., Customer), you can create an anonymous instance of it by creating a
place that has the same name, but preceded by a colon (e.g., :Customer), or a named instance that is preceded by
a colon and the instance name (e.g., Jack:Customer). As in UML, all instances are underlined to distinguish them from
non-instance places:
The master underlying a place may have certain properties, most of which can be visually displayed within the place.
These properties include:
- Name which meaningfully identifies the master. The master name appears inside the place (at the top).
- Stereotype which provides a means of extending the notation (as in UML).
A stereotype may be graphical, in which case, it changes the appearance of a place, or
textual, in which case, it appears within a place, directly above the master name
and within «» (e.g., «Business»).
- Namespace which provides a means for distinguishing between masters with the same name,
but belonging to different contexts. Namespaces are not shown within places.
- Parameters which is only available for parameterized classes and provides
a means of specifying parameters for a template class. These are typically displayed within the
parameterized class.
- Arguments which provides a means of defining a class that is an instantiation of
a parameterized class. The arguments are typically displayed within the class.
- Attributes which specify simple properties for the master (e.g., a Customer class may have name,
address, and age attributes). Only masters with Class semantics kind may have properties.
An attribute may appear within a place (if its Annotate option is set) directly below the master
name. A horizontal line separates the name from the attributes appearing below it.
- Methods which specify the behavior of the master (e.g., a Customer master may have SendTo(mail),
Suspend(), and Charge(amount) methods). Only masters with Class semantics kind may have methods.
A method may appear within a place (if its Annotate option is set) directly below the master
attributes. A horizontal line separates the attributes from the methods appearing below them.
- Types which specify the types defined by the master.
Only masters with Class semantics kind may have types.
A type may appear within a place (if its Annotate option is set) directly below the master
attributes. To distinguish these from attributes, types are displayed in italics.
- Exceptions which specify errors that may be raised by the master (e.g., a Customer class
may have an InvalidAge exception). Only masters with Class semantics kind may have exceptions.
The displaying of attributes, methods, and types within a place is called annotation (or compartment).
Each place with Class semantics has an Annotate option which, when set, causes all attributes/methods/types
of the place (that have their individual Annotate options also set) to be displayed within the class.
For example, the Customer class mentioned earlier would look like this (the right-hand place
also has its Detailed option set, which causes attribute type and method signatures to be shown):
- Select the tool with which you want to create the place from the custom toolbar.
- Position the mouse pointer where you want the center of the new place to be positioned.
- Click the mouse button.
As soon as the place is created, the pointer tool in the main toolbar is automatically selected instead.
If you want to create a few places of the same type in succession, you can override this feature by
holding the shift key down while creating the places. If you don’t hold down the shift key (and if
the Show Properties Upon Creation option is set in the
Tools:Options dialog ) the place
property sheet is displayed upon its creation, so that you can edit the properties.
The new place inherits its color, style, and font characteristics from the template.
Tip: If a master already exists for the place you want to create, then you can create the place easily
and without any typing by instantiating the master.
Tip: If the place has Class semantics then it can either represent the class or a class instance.
This is automatically determined from the place name. If the name contains a colon then anything before
the colon is the instance name (optionally empty) and anything after the colon is the class name.
Examples are: jack:Employee, and :Employee.
To distinguish a class instance from a class, UMLStudio uses the UML convention of automatically
underlining the text for a class instance.
- Bring up the place’s property sheet (see Edit:Properties).
- To show a stereotype name inside the class, just type it in the Stereotype field.
- To show attributes/methods/types inside the place, make sure that the Annotate checkbox is ticked in
the General tab page. The displaying of each attribute/method is controlled individually. Go to the
Attributes, Methods, or Types tab page, select the desired attribute/method and tick its Annotate checkbox.
- If you also tick the Detailed checkbox in the General tab page, then the attribute/method
annotations will appear in detailed format. Otherwise, no parameter, type, or initial value will be
displayed.
- Locate the master row in the lister page.
- Drag the master name onto the drawing pane and drop it where you want the place for the master
instance to appear.
A place is created having the same name and kind as the master.
- Bring up the master’s property sheet. You can do this in three ways:
- Select the master in the lister page of the info pane and then choose
Edit:Properties,
- Double-click the master name in the lister page, or
- View the property sheet of a place that uses that master.
- Make your changes and press the OK button.
- Bring up the master’s property sheet.
- Make a new selection from the Kind combo, or
- If the master has graphical stereotypes, tick the Graphical check box and select a
stereotype from the Stereotype combo.
- Bring up the source master’s property sheet (see Edit:Properties).
- Go to the relevant tab page.
- Place the mouse pointer over the list of attributes/methods/types/exceptions in that tab page and hold
down the right mouse button.
- Select the appropriate Copy/Cut command from the list popup menu.
- Go to the same tab page of the target master’s property sheet.
- Select Paste from the list popup menu.
- Select the master in the lister page.
- Choose Edit:Find. The Find dialog is displayed,
and you will notice that the master name is automatically inserted into the Find field,
and the Search Name Only option ticked.
- Press the Find All button. The Match List tab will come to the front and list all occurrences
of the master in the project.
- To view each occurrence, double click its entry in the Match List.
A link represents a relationship between two places.
It is drawn as a directed line that connects a source place to a destination place. For example, an
inheritance link is used to connect a derived class (Car) to its base class (Vehicle):
A link may have certain properties, most of which can be visually displayed on the link.
These properties include:
- Name which represents the label that appears at the middle of the link.
This is always optional. For link types that it does not make sense (e.g., inheritance link type),
it is never displayed on the link.
- Stereotype which provides a means of extending the notation (as in UML).
A stereotype may be graphical, in which case, it changes the appearance of a link, or
textual, in which case, it appears within a place, directly above the link name
and within «» (e.g., «Business»).
- Roles which specify a pair of roles for the source and the target place of the link.
Both are optional and, when present, are displayed near the point where the link joins the
source/target place.
- Cardinality which specify a pair of cardinalities for the source and the target place of the link.
Both are optional and, when present, are displayed near the point where the link joins the
source/target place.
For example, an association link that connects a Manager class to a Worker class, having the name
manages, and the stereotype business,
and a cardinality pair of 1 to n, and roles of superior and subordinate, will look like this:
Simple links appear as a straight line between two end points. A link, however, may have a more elaborate path
that goes through one or more intermediate points. The user can choose any of the following three styles for
the links in a model:
- Normal links are drawn as ploylines that interconnect the points of each link.
- Step links are drawn as series of horizontal and vertical lines that interconnect the points of each link.
- Curve links are drawn as smooth curves that go through the points of each link.
The following diagram illustrates these styles for a simple model:
- Select the tool with which you want to create the
link from the custom toolbar.
- Position the mouse pointer over the source place (i.e., where you want the link to start from),
hold the mouse button down and drag.
- If you want the link to have intermediate points, drag to where you want the next intermediate
point to appear and release the mouse button. Repeat this step as desired.
- Position the mouse pointer over the destination place (i.e., where you want the link to end), and
release the mouse button.
As soon as the link is created, the pointer tool in the main toolbar is automatically selected instead.
If you want to create a few links of the same type in succession, you can override this feature by
holding the shift key down while creating the links.
The new link inherits its color, style, and font characteristics from the template.
It is perfectly acceptable for a link to have the same place as source and destination (i.e., be circular).
However, note that in this case you would need 2 intermediate points so that the link will look OK.
Method calls are relevant to sequence diagrams, collaboration diagrams, and default diagrams, and only for
links that have Control Flow semantics.
- Select the link and the press the right mouse button. This will produce a popup menu.
- Select the Calls option from this menu. If the destination place for the link has defined
methods (in its property sheet), this will produce a popup submenu of the methods.
- Select the desired method from the popup menu.
The selected method will become the link label.
You can also type a method name directly for a link (or a message). If the method name is not
available in the target class (and its base classes), the following dialog is displayed to allow you
to add it:
Provided the current model uses normal or curve links:
- Select the link.
- Drag the segment of the link (in which you want the intermediate point to be inserted) to where
you want the point to be placed. A link segment is a straight line that joins two consecutive points
of the link.
You can perform these two steps in one hit. The dragged segment is split into two segments joined at the
new intermediate point.
If the current model uses step links, then dragging a segment of a link causes that segment to move
horizontally or vertically, so that the step appearance of the link is preserved.
Provided the current model uses normal or curve links:
- Select the link.
- Drag the intermediate point such that the two segments attached to it form a straight line.
If the resulting line is sufficiently straight, the intermediate point will be removed.
- Bring up the link’s property sheet. You can do this in two ways:
- Select the link and then choose
Edit:Properties,
- Double-click the link in the drawing pane.
- Make your changes and press the OK button.
- Bring up the link’s property sheet.
- Make a new selection from the Kind combo, or
- If the link has graphical stereotypes, tick the Graphical check box and select a
stereotype from the Stereotype combo.
Changing the link looks affects all the links in the current model. To change the link looks:
- Choose Looks:Normal Links to make the links have a jagged appearance.
- Choose Looks:Step Links to make the links have a stepped appearance (i.e., all the segments
meeting at 90 degrees angles).
- Choose Looks:Curve Links to make the links have a curved appearance. This causes the link path to
be drawn as a Bezier curve. The two intermediate points of the link closest to the end-points become
the control points of this curve; any additional intermediate points are ignored.
A tag is a piece of text that appears within a box that is attached to a place. Its role is to provide
additional information about the place, much in the same way comments are used to document code. For example,
the following tag describes an actor:
The point at which a tag joins a place is called its tip.
- Select the tag tool from the main toolbar.
- Place the mouse pointer over the place to which you want to attach the tag, hold the mouse button
down, drag to outside the place, and release the mouse button.
The new tag is created with the current color, style, and font.
- Click the mouse inside the tag and type some text.
- Select the tag.
- Drag the knob at the tip of the tag to inside another place and release the mouse button.
Tip: If you drag the knob to anywhere but inside a place, this operation will have no effect (i.e., the
tag will remain attached to the original place).
A message consists of a small arrow and an attached piece of text, which in turn can be attached to a link.
Messages are only allowed for default and collaboration diagrams, and are
typically used to illustrate method calls, where the method is picked from the methods
of the target place. For example, a Credit message attached to a link from a Customer class to
an Account class looks like this:
When you create messages in a collaboration diagram (but not in a default diagrams, the messages are
automatically numbered (starting at 1).
A message may have certain properties, including:
- Name which represents the label that appears next to the message arrow.
- Reverse which, when ticked, reverses the direction of the message arrow (i.e., from target
place to the source place). When a message is reversed, its Calls popup menu contains the
methods for the source place (instead of the target place) of the link to which the message
is attached.
- Select the message tool from the main toolbar.
- Place the mouse pointer over the link to which you want to attach the message, and click the
mouse button.
- If the target place has defined methods, then a popup menu of these methods (including those of any
base classes) is displayed for the user to choose from.
- Select the message and the press the right mouse button. This will produce a popup menu.
- Select the Calls option from this menu. If the destination place for the link has defined
methods (in its property sheet), this will produce a popup submenu of the methods.
- Select the desired method from the popup menu.
The selected method will become the message label.
Tip: You can directly hand-type the label of a message, in exactly the same way you can type
the label of a link. Simply select the message, click on its text box, and edit the text.
- Choose Arrange:Renumber Messages.
The numbers of all the messages in the diagram are highlighted.
- Click on the messages in the order you want them renumbered.
The first message you click on is renumbered to 1, the second message to 2, and so on.
Tip: If you want to only renumber some of the messages, starting at a number other than 1, hold
the control or shift key down, click on the message that has that number, and then release the
control or shift key. Subsequent clicks will renumber from that number.
A junction is a shape that can be attached to the border of a place. The junction tools are predefined and appear inside a menu in the miscellaneous
toolbar (next to the message tool). Junctions behave as extensions of places and can be used as source or target of links.
- Choose a junction tool from the junction menu.
- Place the mouse pointer on the border of a place and click. An instance of the junction will appear.
- If you want to give the junction a name, make sure it's selected, click on the highlighted text area of the junction and
type the name you wish to give it.
- Drag the junction away from its place, until the cursor changes to an 'x' symbol, and release the mouse button.
- Drag the junction around its place border and release the mouse button where you want it to land.
- This is the same as creating a link between two places, except that you need to make sure that the mouse pointer
appears inside the source or target junction.
A primitive is a simple drawable that (unlike other drawables, such as links and places) is not made
up of other drawables. The main use of primitives is for designing the links and places of a notation
template. However, primitives can also be freely used
in models.
The following primitive types are supported:
- The text primitive is used for creating rectangular regions that contain editable text.
- The line primitive is used for creating straight lines.
- The rectangle primitive is used for creating rectangles.
- The rounded rectangle primitive is used for creating rectangles with rounded corners.
- The ellipse primitive is used for creating oval shapes.
- The polyline primitive is used for creating a continuous set of straight lines.
- The polygon primitive is used for creating a continuous set of straight lines that form
a closed shape.
- The icon primitive is used for creating an instance of a predefined icon, selected from a menu.
The following diagram illustrates these primitive types:
Except for the text primitive, primitives have no associated properties.
- Select the primitive tool from the main toolbar.
- For a line primitive:
- Hold the mouse button down where you want the line to start, drag to where you want it to end,
and release the mouse button.
- For a text, rectangle, rounded rectangle, or ellipse primitive:
- Hold the mouse button down where you want a corner to be placed, drag to where you want the
diagonally opposite corner to be placed, and release the mouse button.
- For a polyline or polygon primitive:
- Click the mouse once for each point. To specify the last point of a polyline or polygon, click
the mouse button twice (without moving the mouse).
- For an icon primitive:
- Click the mouse once where you want the icon to appear.
The new primitive always inherits the current fill color, line color, line style, and font
characteristics, as denoted by the corresponding menus in the main toolbar.
A group is a combination of two or more drawables such that it behaves as one drawable.
Groups provide an easy means of creating progressively more complex drawables out of simpler ones.
Because a group is itself a drawable, you can use it to create other groups, and so on. The drawables
that comprise a group are called the members of that group.
Groups can be used for a number of purposes:
- To combine a segment of your drawing into a single drawable so that it can be selected, dragged,
and resized easily. For example, in a UML use-case diagram, you might want to put a box around all the use-cases
and treat it as a single drawable, and position the actors outside the box.
- To create levels of nesting within the same diagram. For example, in a UML state diagram, you can
group a set of states and transitions to form a complex state.
- To define symbols/patterns for a library. Each symbol/pattern
in a library is defined as a group.
UMLStudio supports two types of groups:
- A primitive group is made up of primitives only (i.e., no links, places, or tags). A primitive
group is itself classified as a primitive, so it can become a member of another (primitive) group.
- A place group is made up of other drawables, with no restriction on the type of the member
drawables. A place group is itself classified as a place of kind Group. If a place group contains
a member text box, then this text box is where the place group’s name will appear. Otherwise,
the place group’s name will appear within the top portion of its enclosing rectangle.
The following diagram shows examples of the two group types:
Because groups are complex drawables, they have more advanced editing behavior:
- When you position the mouse pointer on a group, depending on whether the pointer is positioned on
a member of the group or the group itself, you’ll get different cursors. If the pointer is
positioned on a group member, the cursor will be
. This indicates
that editing operations (e.g., selecting, dragging) will move the member (not the group itself). If the pointer
is positioned on the edge of the group or in a blank area of the group, the cursor will be
. This indicates that editing operations (e.g., selecting, dragging)
will apply to the whole group.
- The members of a group can be manipulated depending on the type of the group:
- To manipulate the members of a primitive group, you must hold down the control key in order, for
example, to select, drag, or resize them. Primitive group members are restricted to the group boundary
(i.e., they cannot be dragged outside the group).
- Members of a place group are readily accessible. When you drag the members of a place group, the
group border is highlighted to show to which group they belong. This is especially handy in nested
groups. If the group is locked, then the border is highlighted in red to indicate that you cannot
drag the members outside the group. Otherwise, the border is highlighted in green.
- In an unlocked place group, you can remove members from the group by dragging them outside the group,
and you can add new members to the group by dragging them inside the group.
- The property sheet for a place group has three additional
checkboxes:
- Autosize which, when ticked, expands/shrinks the group when you drag its members, so that the
group tightly encloses the members.
- Lock Members which, when ticked, prevents the members from being dragged outside the group or
new members to be dragged inside the group.
- Border which, when ticked, causes a rectangular border to appear around the group.
- In the property sheet for a place group you can use the Kind combo
to select a different appearance for the group. Initially, Kind is set to empty, which causes the group to be
drawn as a box. By choosing a different place type from the Kind combo, you can give the group the corresponding
appearance. You can also tick the Graphical checkbox and choose a different value from the Stereotype combo. This will give the
group the appearance of the selected stereotype.
- When working with groups, you might want to select the View:Highlight Groups
option. This causes the groups background to be shaded, so that they stand out.
- Because a place group is itself a place, you can connect links not only to its members, but also to the
group.
A primitive group requires all its members to be also primitives. Two groups cannot share the same
drawable as a direct member.
Because a place group is not directly created by a custom tool, it will be of the special kind Group.
Tip: Because a group is itself a drawable, it can become a member of another group.
Ungrouping restores the members. If a member is itself a group, then it will not be ungrouped, unless
you ungroup it directly (i.e., ungroup applies to one level of grouping at a time).
When you ungroup a place group, any links to the members remain intact, but any links to the
place group itself are removed.
- Hold down the control key.
- Manipulate the group members (e.g., select, drag, resize them).
- You can only do this to an unlocked place group.
- Drag the drawables you want to add to the group, inside the group.
When the group border is highlighted in green, you can release the mouse button.
The group is resized in order to accommodate the new members.
- You can only do this to an unlocked place group.
- Drag the drawables you want to remove from the group, outside the group.
When the group border is de-highlighted, you can release the mouse button.
The group is resized in order to tightly enclose the remaining members.
When working with activity diagrams, it is often useful to partition the diagram into
fragments that represent the division of responsibilities. Visually, each such division is
represented by a vertical strip (a swimlane, or a lane for short) that has a border
separating it from the next lane.
For maximum generality, UMLStudio allows the use of swimlanes in all
types of diagrams, except for sequence diagrams. Also, when you use swimlanes in a diagram,
UMLStudio does not force all the drawables in the diagram to appear
inside lanes. Some of your drawables can be inside lanes and some outside.
Internally, UMLStudio treats swimlanes as a specialization of place group.
Specifically:
- Every swimlane has a title, which appears at the top of the lane, and is shaded in grey.
- When you select a swimlane, no knobs appear around it. Instead, the title area is highlighted
in dark grey.
- You cannot drag a swimlane, you can only change its order by moving it left or right.
- You cannot freely resize a swimlane, you can only move its left or right border.
If this is the first swimlane in the diagram, then everything to the left of the click point becomes
a member of the lane.
If there are existing swimlanes in the diagram, then the new swimlane may become the first lane,
the last lane, or be inserted between two other lanes, depending on the click point.
- Position the cursor on the left or the right border of the lane.
The cursor will change to indicate that you can drag the border.
- Hold the mouse button down, drag, and then release the mouse button.
Because a swimlane must physically contain its members, a lane cannot be shrunk beyond the
tightest rectangle that encloses the members. Also, a minimum lane width is enforced, so that even
an empty lane cannot be shrunk to zero.
- Select the lane you want to reposition.
- Press the left arrow key to move the lane left by one position (i.e., to swap this
lane with its left neighbor), or
- Press the right arrow key to move the lane right by one position (i.e., to swap this
lane with its right neighbor).
- Select the drawables you want to move (all must reside inside one lane, or outside all lanes).
- Drag the selected drawables to elsewhere (e.g., inside another lane, or outside all lanes).
The following editing tasks are of generic nature and apply to most (and in some cases all) drawables.
To select a single drawable:
- Simply click on the drawable to select it. This first deselects all currently selected drawables,
unless the clicked drawable is already selected, in which case the selected set is unchanged.
You can select multiple drawables, using either of these two methods:
- Hold the shift key down while clicking on each drawable. This adds the drawable to the selected
set if it’s not selected; otherwise, it removes it from the selected set.
- Position the mouse pointer in a blank area, hold the mouse button down and drag. A grey rectangle
will appear as you drag. When you release the mouse button, any drawable that overlaps this rectangle
will be selected. You can also hold the shift key down, while doing this, to expand/shrink the
selected set in a manner similar to the first method.
When drawables overlap:
- Clicking on the drawables will select the front-most drawable. If you hold the control key down
when clicking, the bottom-most drawable will be selected instead.
- Select the drawables you want to reposition.
- Position the mouse pointer on any one of the selected drawables, hold the mouse button down, drag,
and release the button when you’re happy with the new position.
These two steps can be performed in one go if you want to reposition a single drawable.
Repositioned drawables cannot move outside the drawing boundary. Similarly, repositioned members of a
group cannot move outside the group boundary.
Tip: You can’t reposition a link, unless you’re repositioning its end places as well. Conversely, if you
reposition the end places of a link, the link is also repositioned, regardless of whether it’s selected
or not.
Tip: When you drag a message, a red line connecting the center of the message arrow to the center of the
link segment to which it is attached, is displayed. This provides a visual clue as to which link the
message is attached.
Tip: You can reposition the members of a group, provided your selected set is restricted to the group
members (i.e., does not also include drawables outside the group). In a primitive group, you must hold down
the control key when you do this. In a place group, you can drag members of a group outside it (to remove them
from the group), or drag drawables inside the group (to add them to the group).
- Select the drawable you want to resize/adjust.
- Drag one of the knobs of the drawable to resize/adjust it.
The way the drawable is resized/adjusted depends on its kind:
- Place and group drawables have four knobs, one at each corner of the imaginary boundary
that encloses the place. Dragging any of these knobs causes the place to be resized such that the
center of the place in anchored (i.e., causing the place to be inflated/deflated). If you want only
the dragged corner to be affected, hold down the control key while dragging.
- Text box, rectangle, rounded rectangle, oval, and primitive drawables are resized in a manner
similar to places.
- Tag drawables are resized in a manner similar to places when one of the four knobs around the
tag text is dragged. Dragging the knob at the tip of the tag can be used to attach the tag to another
place.
- The arrow of a message drawable cannot be resized. You can only resize the message text box by
dragging its corner knob.
- Line, polyline, and polygon drawables are adjusted by the point denoted by the dragged knob being
repositioned.
- Link drawables are adjusted in a manner similar to polylines, except that dragging the end-point
knobs can be used to change the source/destination of the link. Also, for a link that has a middle
attachment (e.g., for entering a label), an additional knob appears at the bottom-right corner of the
box enclosing the attachment. Dragging this knob will resize the attachment accordingly.
You can do this provided the drawable is a text box, a place or place group, a link that has a text box
in it, or a tag.
- Select the drawable.
- Position the mouse pointer inside the drawable’s text box by clicking on it.
- Type some text.
Tip: You can also change a drawable’s text by editing it in the drawable’s
property sheet.
- Bring up the drawable’s property sheet. You can do this in two ways:
- Select the drawable and then choose Edit:Properties.
(If the Properties dialog is already
displayed for another drawable, simply selecting the drawable will cause the dialog to show the
properties of the selected drawable.), or
- Double-click the drawable.
- Make your changes and press the OK button.
A drawable has two colors associated with it:
- A line color which is used for drawing the drawable’s lines.
- A fill color which is used to fill the area enclosed by the drawable.
To change the line/fill color:
Tip: If you select a single drawable and look at the line/fill color menu, it will indicate the
drawable’s current color.
Tip: You can change the default line/fill color by making a selection from the line/fill menu when no
drawable is selected. The default line/fill color only applies to primitives.
Tip: You can change the color of the shaft of a link model by making a selection from the line color
menu when no drawable of the link model is selected.
- Select the drawables you want to be affected.
- Select the desired line style from the line style menu in the main toolbar.
Tip: If you select a single drawable and look at the line style menu, it will indicate the drawable’s
current line style.
Tip: You can change the default line style by making a selection from this menu when no drawable is
selected. The default line style only applies to primitives.
Tip: You can change the line style of the shaft of a link model by making a selection from the line style
menu when no drawable of the link model is selected.
- Select the drawables you want to be affected.
- Press the font button in the main toolbar. A dialog will be displayed for
specifying the desired font characteristics. Make your selections and press the OK button.
Tip: If you select a single drawable and bring up the font dialog, it will indicate the drawable’s
current font characteristics.
Tip: You can change the default font characteristics by bringing up the font dialog when no drawable is
selected and making your changes. The default font characteristics only apply to text primitives.
- Select the drawables you want to delete.
- Press the delete key or choose Edit:Delete.
When you delete a place:
- All links and tags attached to the place are also deleted.
- The master associated with the place is also deleted, unless there is at least one other place
referring to that master (i.e., the master reference count is greater than 1).
- If the place has a submodel then this is attached to the master, not the place. If the master is deleted,
the submodel is deleted as well.
- Select the drawables you want to move.
- Choose Edit:Copy if you want to just move a copy,
or Edit:Cut otherwise.
- Go to where you want the drawables to be moved to:
- If the target is a UMLStudio model (in this or another project), go to that model by, for
example, selecting it in the explorer pane. Make sure you click in the drawing pane to make it the
current view.
- If the target is another application, run/switch to that application.
- Choose Edit:Paste there.
Copying does not affect the copied drawables. Cutting is equivalent to copying the drawables and then
deleting the originals.
Drawables are physically stacked in the order they are created. This ordering has no significance when
the drawables do not overlap. However, when they do overlap, the ones at the top of the stack (i.e., most
recently created) appear on top of others. To change the stacking order:
Undo cancels the effect of the last editing operation. The actual menu command name changes to indicate
the operation that can be undone. For example, after a drag operation, the menu command becomes Undo Drag.
You can also cancel an undo by choosing this command again. In this case, the command name changes to
Redo (e.g., Redo Drag).
Except for Edit:Replace, all normal editing operations are undoable.
Sequence diagrams
are used to describe scenarios by showing the sequence in which a set of objects invoke
each others methods in order to perform a task. They have a few special features that are not available
in other types of diagram. This section describes them.
In a sequence diagram:
- Each place has a shaft (a vertical line that appears below it). This shaft denotes the life-time
of the object that the place represents. (Time flows in downward direction.)
- Each link represents a method invocation (i.e., a call). A link extends from the shaft of the
calling object to the shaft of the called object.
- The life-time of each call is represented by a call-box (a tall and narrow box that appears on
a shaft). A link typically flows from one call box to another.
To create an object:
- Select the place tool (e.g., the class tool).
- Click where you want the object to appear. An object with a default shaft size (and a call box) is created.
To resize the shaft of an object:
- Select the object by clicking on it.
- Drag the knob at the bottom of the shaft. Shafts extend/shrink only in vertical direction. A
minimum shaft size is also enforced.
All other place editing operations are the same as in other diagrams.
To create a method call:
- Select a link tool that has Control Flow semantics from the custom toolbar.
- Position the mouse pointer over the shaft of the source place or a call-box on the shaft (i.e., where you want the call to
start from), hold the mouse button down and drag.
- Position the mouse pointer over the shaft of the destination place or a call-box on the shaft (i.e., where you want the call
to end), and release the mouse button.
- If the destination place has defined methods (in its property sheet), then a popup menu of the
methods appears. Selecting a method from this menu will cause it to become the link label.
- If the source or destination shaft has no call-box at the point where the link connects to it,
a call box is automatically created.
To create a self method call:
- Do the same as above, except that instead of dragging to a destination shaft, drag to a blank
area and release the mouse button.
- Alternatively, simply click the mouse on a shaft without dragging.
- If the place has defined methods (in its property sheet), then a popup menu of the methods
appears. Selecting a method from this menu will cause it to become the link label.
To adjust a method call:
- For a non-self call, drag the call up or down.
- For a self call, drag its horizontal parts up or down, or drag its vertical part sideways.
To connect a non-self method call to another object:
- Select the link by clicking on it.
- Drag the source/destination knob to the shaft of another object, and release the mouse button.
Other link editing operations are the same as in other diagrams.
To delete a call-box:
- Click on the call-box and drag it away from the shaft on which it appears.
- When the mouse pointer changes to a diagonal cross, release the mouse button.
- Any links connected to the call-box are automatically deleted as a result.
To resize a call-box:
- Drag the top or bottom border of the call-box.
To merge two neighboring call-boxs:
- Drag one until it overlaps the other and release the mouse button (take care not to drag the call-box
away from its shaft, or it will get deleted).
A hyper link is a small area in the drawing pane that, when clicked, causes an automatic jump to
the thing that it is linked to. When the mouse pointer is positioned on a hyper link, the cursor
changes to a hand to indicate this. Hyper links can be completely switched off by un-ticking the
View:Show Hyper Links option.
UMLStudio supports two types of hyper link:
- A refinement hyper link is represented by a small yellow box that appears at the bottom right
corner of a place that has a submodel. The cursor for this type of hyper link is a hand with a
small plus (+) in the middle, indicating that clicking the link will cause the submodel to be displayed
instead. When in the submodel, you can do the reverse by holding down the control key and clicking
the mouse button in a blank area of the drawing (the cursor in this case changes to a hand with a small
minus (-) in the middle, indicating that clicking the mouse will display the parent model instead).
- A textual hyper link can be specified via the
property sheet of a place, a link, or a message.
The property sheet of these drawables provides a field for specifying the link address, which may be a
URL or a document. If a drawable has a textual hyper link then its name is drawn in blue color and
is underlined to signify this. When the mouse pointer is positioned on the name, the cursor changes to
a hand. Clicking the mouse button causes the link to be exercised. For a URL, this means that the
default web browser is launched and set to point to that address. For a document, this causes the
application associated with the document to be launched to open the document.
Table of Contents | Chapter2 | Chapter 4
Copyright © 1996-2009 PragSoft Corporation (www.pragsoft.com)