Previous Next
agilian_user_guide Chapter 4 - Visual Modeling

Chapter 4 - Visual Modeling

This chapter will show you the features of performing UML modeling.

In this chapter:

Showing Model in Different Diagram

A model is a specific collection of interconnected objects and their properties. A diagram element is the view associated with the model. In Agilian, one model can have multiple views. Also, Agilian supports sharing models to show the same model in different diagrams. This can help to avoid putting everything in a single giant diagram, leading to difficulties in modeling and understanding.

Here, a class model is used as an example.

To show the model in a different diagram:

1. Select a class model in the Model pane.

Figure 4.1 - Select a class model


2. Create a new class diagram, drag the model from model tree.

Figure 4.2 - Drag the model

3. A new view of the model is created.

Figure 4.3 - View created

Form Diagram from Model

This feature can help you visualize a set of model and transfer it to a diagram with a few clicks. There are different options to form diagrams to fit different needs.
You can form a diagram with the selected models (classes/packages) in the Model pane and Class Repository pane.
  1. Open/Activate the Model pane or Class Repository pane.
  2. Select the classes and packages you would like to appear in the new Class Diagram.
  3. Right-click on the selection and select Form Diagram from the popup menu.
  4. Choose from one of the Form Diagram types (Customize..., Hierarchical, or Navigation) in the cascading menu.
  5. Figure 4.4 - Form diagram from model
Currently Agilian allows you to form diagrams with only packages and classes.

Customize Form Diagram Properties

You can use the Form Diagram dialog box to customize form diagram properties.
To open the Form Diagram dialog box:
1. Select more than one classes or packages in Model pane or Class Repository.
Figure 4.5 - Select models

2. Right click on them and select Customize... from the popup menu, the Form Diagram dialog box appears.
Figure 4.6 - Open Form Diagram dialog box

Select the relationships you want to show in the new diagram in the Form Diagram tab. The relationships can be between the diagram elements of the selected models and their related diagram elements.

Figure 4.7 - Form Diagram Dialog

A new diagram is created with the diagram elements of the selected models, the related diagram elements and the relationships between the diagram elements.

Figure 4.8 - The generated Class Diagram

In this case, the class model called "ORM_Staff" and "ORM_TradingInfo" are selected. The new diagram (on the right hand side) shows the relationships between the the two models and other models.

Figure 4.9 - The association of the selected classes are included in the new diagram

Presentation Options

Click the Presentation Options tab on the Form Diagram dialog box to set the presentation options for the classes in the new diagram.

Figure 4.10 - The presentation options

Hierarchical Diagram

If you selected Hierarchical in the cascading menu, a new diagram is created with the diagram elements of the selected models, the parents and children of the diagram elements and the general relationships between the diagram elements.

Figure 4.11 - Hierarchical Diagram

In this case, the class model called "Clerk" is selected. The new diagram (on the right hand side) shows the generalization relationships between the "Clerk" model and other related models.

Figure 4.12 - Show the inheritance hierarchical in the new diagram

Navigation Diagram

If you selected Navigation in the cascading menu, a new diagram is created with the diagram elements of the selected models, the sources (non-navigable diagram elements) and targets (navigable diagram elements) of the diagram elements and the association relationships between the diagram elements.

Figure 4.13 - Navigation Diagram

In this case, the class model called "Order" is selected. The new diagram (on the right hand side) shows the association relationships between the "Order" model and other related models.

Figure 4.14 - show the navigation association of the selected classes.

Sub-Diagrams

It is a known fact that elaboration is one of the common modeling techniques.
Agilian supports sub-diagrams to facilitate elaboration. For example, we have a Use Case Diagram to elaborate each use case by a Sequence Diagram.
You can create new sub-diagram or associate with existing diagrams as a sub-diagram.

Creating a Sub-Diagram

To create a new sub-diagram for a model, perform one of the following actions:

For example, here is a Use Case creating sequence diagram.

Figure 4.15 - Create Sequence Diagram

Selecting Existing Diagrams as Sub-Diagrams

To select existing diagrams as sub-diagrams:
In both cases, the Add Sub Diagrams Dialog will be displayed.
Figure 4.17 - Select the existing diagram
The Add Sub Diagrams dialog shows all the selectable diagrams. Selectable diagrams are all the diagrams in the project excluding the following:
Select the diagrams to add as sub-diagrams, and then click OK to confirm.

Viewing the List of Sub-Diagrams

To view sub-diagram from its parent model element:

Opening Sub-Diagrams

To open a sub-diagram from a parent diagram element, perform one of the following actions:

Removing Sub-Diagrams

To remove a sub-diagram from its parent diagram element, perform one of the following actions:

Navigating to the Parent Element of a Sub-Diagram

The diagram title bar of a sub-diagram will have the name of the parent element preceding the diagram name. Click on the name of the parent model and this element will be selected if the model has a view. If the model does not have a view, click on the name will open the Specification dialog box.
Figure 4.20 - Navigating to the Parent Element

References

References can be added to a model to associate any kind of artifacts, including files, folders, URLs and diagrams with the model. After you have added the references, you can open them in the tool with the default application/web browser whenever you need them.
There are four kinds of reference you can add:

Adding Referenced File

To add a referenced file using the open specification dialog box:
  1. Open the specification dialog box of the model, select the References tab.
  2. Click the Add File... button, or right-click on the table and select Add File... from the popup menu.
  3. Figure 4.21 - Add Reference Files
To add a referenced file using the References resource:
  1. Click on the References resource (located at the lower left corner of the shape, with a shortcut arrow icon).
    Figure 4.22 - Edit reference resource-centric
  2. Select Add File... in the popup menu.
    Figure 4.23 - Select Add File in the popup menu
Using either method, the reference details pane will be shown. Specify the file path in Path or browse by clicking the ... button. You may also optionally provide a description for the reference in Description.
Figure 4.24 - Edit Reference

Adding folders, URLs and diagrams can be done by using a similar approach.

Editing References

To edit references:

Open the open specification dialog box of the model, select the References page. Alternatively click on the References resource of a shape and select Edit References from the popup menu.

    Figure 4.25 - Open edit reference dialog

Right-click on a reference and select Edit from the popup menu.
    Figure 4.26 - Edit reference by clicking on popup menu

Alternatively, click the Details button to show the details pane if it is not already showing.

    Figure 4.27 - Show reference details

Using either method, the reference details pane will be shown. You can then edit the path and description of the selected reference.

    Figure 4.28 - The reference details

Reordering References

To reorder references:
  1. Open the specification dialog box of the model, select the References page.
  2. Select one or more references in the table.
  3. Click on the Move up/Move down button to move the selection upwards/downwards. Alternatively right-click on the selection and select Move Up/Move Down from the popup menu.
  4. Figure 4.29 - Re-ordering reference

Opening References

To open references:
  1. Open the specification dialog box of the model, select the References page.
  2. Select one or more references in the table.
  3. Click on the Open... button, or press the Enter key, or right-click on the selection and select Open... from the popup menu.
  4. Figure 4.30 - Press Open button to open the selected references.
  5. Alternatively, click on the References resource of a shape and select a reference from the popup menu.
  6. Figure 4.31 - Open reference by clicking on popup menu
  7. The selected references will be opened by the default applications or web browser.

Removing References

To remove references:
  1. Open the specification dialog box of the model, select the References page.
  2. Select the unwanted references in the table. Click the Remove button, or press the Delete key, or right-click on the selection and select Remove from the popup menu.
  3. Figure 4.32 - Remove reference

User Path

A user path is a variable that refers to a base path in a user's computer. You can add a reference to local file using a user path, so that the reference refers to a file relative to a user path, instead of an absolute path. This means you can move references files to a different location, or even to a different computer, and can still open them as long as the user path value is up-to-date.

Configuring User Paths

To configure user paths, select menu Tools > Options.... Select the User Path category in the Options dialog box.
Figure 4.33 - Configure User Paths

Logical View

The Logical View refers to a user's view of the way project is organized. It provides another view of creating, structuring and sharing the UML diagrams and models apart from the traditional Diagram Navigator, Model Tree View and Class Repository.
Figure 4.37 - Logical View Pane

Creating a Logical View

To create a view:
  1. Right-click on the project node (top-most node of the Logical View pane) and choose Add View from the popup menu. This creates a new View under the project node.
  2. Right-click on the new view and choose Rename...from the popup menu to provide a name for the view.
  3. Enter the name in the displayed input box and click OK to confirm the changes.

Creating Diagram(s) under View

To create a diagram under a view, right-click on the view that holds the new diagram and choose Create Diagram > Create %DIAGRAM_TYPE% from the popup menu. This creates a blank diagram of the selected type under the chosen view.

Moving Diagram(s) between Views

To move the diagram from one view to another, simply drag and drop it to the target view. The diagram will therefore transfer from original view to target view.

Exporting and Importing View

You can export the current Logical View structure as an XML file and apply it over and again on other projects. There are two options for importing a Logical View structure.

Append to existing structure
The imported structure will append to the current structure, no modification will be made on the existing one.

 

Replace existing structure
The imported structure will replace the current structure, predefined structure will be removed.

For any diagram in the current project that has the same name as any of the diagrams in the XML file, the diagram name will be displayed in the Logical View of the current project. Otherwise the name will not be shown in the imported structure.

Finding a Model Element

Model elements can be searched in the project. To find a model element, you should first display the Find dialog box. To display the Find dialog box, select Edit > Find from main menu.


Figure 4.38 - Find Model Element Dialog
Field Description
Text Enter the text for which you want to search. The text may be the name of the model element or part of the model documentation.
Scope
Find in diagram Select from drop-down menu any of the options to narrow the search in different ways:
Find in All Diagrams - To search for views in all diagrams within the project.
Find in Opened Diagrams - To search for views in all opened diagrams within the project.
Find in active diagram only - To search for views in the active diagram.
Do not find in diagrams - Not to search for views in any of the diagrams.
Find in model Check/Uncheck to enable/disable searching for model elements from existing models within the project.
Include documentation of elements Check/Uncheck to enable/disable searching not only for the name of the model, but also the documentation of the model.
Include tagged values Select from the drop-down menu any of the options to include tagged values:
No - Do not include tagged value during searching
Name - Include Name of tagged value only during searching
Value - Include Value of tagged value only during searching
Name and Value - Include both Name and Value during searching
Model Types
All model types This option is available only when Find in model is checked. This enables to search model elements with all types.
Specified model types This option is available only when Find in model is checked. This enables you to search model elements with the same model type as the one specified from the list beneath it.
Option
Case Sensitive Check/Uncheck to determine whether or not a case sensitive or insensitive search is to be performed.
Match whole words only Accept models only if their name and/or documentation match exactly the word specified in Text field.
General commands
Reset Reset the changes made in the dialog box.
Find Find model elements according to the scope specified from the Find dialog box.
Close Close the Find dialog box without performing search.
Help Display the Help content of Find dialog box.
Table 4.1
Search result will be displayed in the Find Results page of the Message pane.
Figure 4.39 - Find result
There are two types of results found. One is for displaying the model found and the other one is for displaying view found.
Figure 4.40 - Types of result found

You can copy, remove or clear result(s) by right-clicking on the result(s) and selecting the corresponding commands from the popup menu.

Jumping to Shape/Model

In order to let you locate the desired shape/model easier and faster, the jump to shape/model facility is introduced. You can select either jump to a shape in the active diagram, or jump to any shape/model in the current project.

Jumping to Shape in Active Diagram

  1. With a diagram active, select menu Edit > Jump to Element in Active Diagram..., or press the hotkey Ctrl + J.
  2. Figure 4.41 - Select Jump to shape in active diagram
  3. The jump to shape pane is shown. If you are uncertain about the name of the shape to jump to, press the Up/Down arrow key to popup the shape list and browse for it there.
  4. Figure 4.42 - Shape in the active diagram is shown
  5. Upon the selection of an item in the list, extra information like the parent of the selected element is shown. If you keep selecting an item for one second, the corresponding element will be "spotlighted" in the diagram.
  6. Figure 4.43 - Spotlight on the diagram when select the shape
  7. When the spotlighting is in action, the jump to shape pane will reposition itself to avoid overlapping with the target shape if the Auto position option is selected.
  8. Figure 4.44 - Auto position
  9. If you know the name of the shape to find, you can type all or part of its name to filter the items in the list to locate the shape faster. Wildcard characters * (all combination of characters) and ? (any one character) can also be used.
  10. Figure 4.45 - Filter the shapes
  11. With the desired item in the list selected, press the Enter Key. The corresponding element will be selected and centered in the diagram.
Figure 4.46 - Auto select the shape and centered in diagram

Jumping to Element in Project

  1. Select menu Edit > Jump to Element..., or press the hotkey Ctrl + Shift + J.
  2. Figure 4.47 - Select Jump to element
  3. The 'jump to element' pane is shown. Similar to 'jump to shape' in the active diagram, you can press the Up/Down arrow key to popup the list of elements, and type text to filter the list. But this time the list is filled with all shapes and models in the project, regardless of the diagram they reside in. To let you identify which diagram a selected element comes from, its diagram name is also displayed.
  4. Figure 4.48 - Select the Element
  5. If the selected item refers to an element in the active diagram, this element will be spotlighted in the diagram.
  6. Figure 4.49 - Spotlight in the diagram
  7. With the desired element in the list selected, press the Enter Key. If the selected element belongs to a diagram, this diagram will be opened, and the element will be selected and centered in the diagram. If the selected element is a model that does not have a view, it will be selected in the Model pane.
  8. Figure 4.50 - Select in Model pane

Mouse Gesture

Mouse gestures allow you to execute common commands and create UML models within the diagrams.

Using Mouse Gesture in Windows

To use mouse gestures in Windows, simply hold down the right mouse button and move the mouse to form the gesture (a blue path will be shown indicating your gesture). When you release the button, the gesture command will be executed.

Figure 4.51 - Using mouse gesture in Windows

Using Mouse Gesture in Linux

 

If you want to use mouse gestures in Linux, you can press the left mouse button on the diagram and drag the desired gesture while holding the Ctrl key, release the mouse button and key when done.

Figure 4.52 - Using mouse gesture in Linux

Using Mouse Gesture in Mac OSX

 

To draw a mouse gesture, you can press the left mouse button on the diagram and drag the desired gesture while holding the Apple key. Then, release the mouse button and key when done.


Figure 4.53 - Using mouse gesture in Mac OSX

General Features

 

The following is the 11 basic gestures supported by Agilian:

Gestures Description
Gestures Descriptions
Down V Right
Down V Left
Clockwise Rectangle*
Counter Clockwise Rectangle*
Folder Shape*
Right V Left#
Down V Up#
Right V Left V Right V Down V Left V Up*#
Left V Down V Right V Down V Left (squarish S)   Right V Down V Left V Up - Right
Left V Down V Right V Up - Left      
Table 4.2

The node is the start point of each gesture
* Start at any point
# Bi-directional

A full list of gesture commands can be found in the Appendix C.


Figure 4.54 - Mouse Gesture Example

You can also draw with a Gesture Pen in the toolbar.

Figure 4.55 - Draw with gesture pen


Gesture Start Point and Direction

For the gestures marked as "Start at Any Point" like the Clock-wise Rectangle, start from any corner will give you the same result. And for the gestures marked as "Bi-directional" like "Right-Left" , start from right or left will also give you the same results.

= = =
             
=      
Figure 4.56 - Gesture Start Point and Direction

Initial State and Final State

The initial state and final state use the same gestures. The gesture will create an initial state if an initial state is not exist in the diagram, and a final state will be created if there is an initial state but no final state. If the diagram has both initial state and final state, the gesture will do nothing.

Connecting Shapes using Mouse Gesture

Right-click on a shape and then drag over another shape, release the mouse until you see the blue gesture path drawn between them. A connector will be created between the shapes, whose turning points are determined by the gesture path you dragged.

Figure 4.57 - Create association

If you drag the mouse gesture from a shape but release it over empty space of the diagram, a popup menu will appear for you to select a connector-shape pair. After selected a pair, a new shape together with a new connector of the selected types are created.

Figure 4.58 - Create Use Case with Association

Creating Class Members using Mouse Gesture

Creating Attribute

Right-click on a class, drag to the left and release the mouse until you see the blue gesture line, an attribute will be created.

Figure 4.59 - Create attribute

Note that if you release the mouse OUTSIDE the class, the created attribute will be stereotyped as Property, and with its Setter and Getter properties automatically set to true.

Figure 4.60 - Attribute created with getter and setter

Creating Operation

Right-click on a class, drag to the right and release the mouse until you see the blue gesture line, an operation will be created.

Figure 4.61 - Create operation

Note that if you release the mouse INSIDE the class, the created operation will have its visibility set to protected instead of public.

Sweeper

A sweeper allows you to create space for placing shapes.
To use sweeper:
1. Click on the icon on the diagram toolbar.

 

Figure 4.62 - Select Sweeper icon

2. Click anywhere on the diagram while holding your left click, a plus sign will appear in the diagram.

Figure 4.63 - Sweeper appears as Plus sign

3. You can then move the mouse left and right to create some horizontal spaces between shapes.

Figure 4.64 - Use Sweeper to create horizontal Space


4. Horizontal space created.

Figure 4.65 - Horizontal space created

Similarly, you can move the mouse up and down to create some vertical spaces between shapes.

Figure 4.66 - Use Sweeper to create vertical space

Vertical space is created.

Figure 4.67 - Vertical space is created.

Customizing Data Types

You can choose a programming language that your UML project is based on. By default, there are six types of languages. They are:

Also, you can assign data type to attributes, operations (as return type) and parameters. Furthermore, new languages and data types can be added.

Configuring Project Programming Language

1. Right-click on the project root node under Diagram Navigator / Model pane / Class Repository  and then select Configure Programming Language... from the popup menu.

Figure 4.68 - Select Configure Programming Language button

2. Select the language to switch to.

Figure 4.69 - Select language to switch to

3. The language is changed. The data type will be changed to match the language.

Figure 4.70 - Language changed


Adding Languages and Data Types

1. Select Tools > Options... from the main menu.

Figure 4.71 - Select Option button from main menu

2. Open the Data Type page.

Figure 4.72 - Open the Data Type page

3. Press on the plus sign and enter its name to add a language.

Figure 4.73 - Add a language


4. Press Add... and enter its name to add a data-type to the chosen language.

Figure 4.74 - Add a data type


5. A new language with data-type is added.


 
Figure 4.75 - A new language with data-type is added

Previous Next
Visual Paradigm International Limited
Website: www.visual-paradigm.com
E-mail: support@visual-paradigm.com