![]() ![]() ![]() |
This chapter will show you the features of performing UML modeling.
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
|
![]() |
Figure 4.4 - Form diagram from model |
![]() |
Currently Agilian allows you to form diagrams with only packages and classes. |
![]() |
Figure 4.5 - Select models
|
![]() |
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 |
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 |
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 |
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. |
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.
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
|
![]() |
Figure 4.16 - Add existing diagram to Sub-Diagram |
![]() |
Figure 4.17 - Select the existing diagram |
![]() |
Figure 4.18 - Open Sub-diagram |
![]() |
Figure 4.19 - Remove Sub-Diagram |
![]() |
Figure 4.20 - Navigating to the Parent Element |
![]() |
Figure 4.21 - Add Reference Files |
![]() |
Figure 4.22 - Edit reference resource-centric |
![]() |
Figure 4.23 - Select Add File in the popup menu |
![]() |
Figure 4.24 - Edit Reference |
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 |
![]() |
Figure 4.26 - Edit reference by clicking on popup menu |
![]() |
Figure 4.27 - Show reference details |
![]() |
Figure 4.28 - The reference details |
![]() |
Figure 4.29 - Re-ordering reference |
![]() |
Figure 4.30 - Press Open button to open the selected references. |
![]() |
Figure 4.31 - Open reference by clicking on popup menu |
![]() |
Figure 4.32 - Remove reference |
![]() |
Figure 4.33 - Configure User Paths |
![]() |
Figure 4.34 - Add User Path |
![]() |
Figure 4.35 - Using User Path in the references |
![]() |
![]() |
![]() |
Figure 4.36 - Specify user path |
![]() |
Figure 4.37 - Logical View Pane |
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.
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. |
![]() |
Figure 4.39 - Find result |
![]() |
Figure 4.40 - Types of result found |
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.
![]() |
Figure 4.41 - Select Jump to shape in active diagram |
![]() |
Figure 4.42 - Shape in the active diagram is shown |
![]() |
Figure 4.43 - Spotlight on the diagram when select the shape |
![]() |
Figure 4.44 - Auto position |
![]() |
Figure 4.45 - Filter the shapes |
![]() |
Figure 4.46 - Auto select the shape and centered in diagram |
![]() |
Figure 4.47 - Select Jump to element |
![]() |
Figure 4.48 - Select the Element |
![]() |
Figure 4.49 - Spotlight in the diagram |
![]() |
Figure 4.50 - Select in Model pane |
Mouse gestures allow you to execute common commands and create UML models within the diagrams.
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 |
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
|
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
|
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 |
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 |
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 |
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.
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 |
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 |
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.
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. |
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.
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 |
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 |
|
|