![]() ![]() ![]() |
This chapter will show you how to change the style and format of diagram elements.
One of the goals of modeling is help the modeler and readers to understand the subject being modeled. As a result, applying consistent style and formatting can greatly improve the efficiency of modeling. In Agilian, it supports a rich array of tools in a set to help the modeler to perform modeling.
Connectors are the lines that connect two shapes. When more shapes are created and more connectors appear, you may find that it is difficult to handle the straight spaghetti-like connectors. To overcome this problem, Agilian provides five connector styles to help you handle the connectors, namely Rectilinear, Oblique, Curve, Round Oblique and Round Rectilinear.
![]() |
Figure 3.1 - Different types of connectors |
When a new connector is created, it follows the default connector style defined in the Options of the application. It is possible to change the connector style individually. There are two ways to change the connector style. The first one is via a popup menu and the other is via the Property table.
To change the connector style via popup menu:
![]() |
Figure 3.2 - Change connector style on popup menu |
![]() |
Figure 3.3 - Change connector style on properties table |
Once the connector is set to Rectilinear, the connector always remains either horizontal or vertical. You cannot create a breakpoint on the connector by yourself. The breakpoints are generated on the connector automatically after you reshape the line.
In the following figure, there is a pin icon at each end of the connector. Pinning a connection end point allows the pinned end point of a connector to be fixed, no matter how the connecting shapes are moved. For further details, please refer to Connection Point Style> Pinning the Connection End Point in this chapter.
![]() |
Figure 3.4 - Rectilinear Connector Style |
To reshape the connector, you can drag the lines or the break points at the connector.
There is a horizontal line and vertical line along the connector. If you are dragging on the horizontal lines, the lines can only move up or down. In the following figures, the line we want to move is in blue. As you can see, the right end point of the blue line is touching Class2. After moving the red line upwards, the right end point of the blue line does not touch Class2. To rectify this, a vertical line is automatically created to continue the connection between Class and Class2.
![]() |
![]() |
Figure 3.5 - Drag on the line |
The result of dragging the vertical line is similar to dragging the horizontal line. The difference is that the line is restricted to vertical movement (either from left to right or from right to left). When two shapes are disconnected, a horizontal line will be created at the end of point to continue the connection between shapes.
Dragging on break points provides two dimensional movements to the point, modifying the connectors. The point being moved may affect all lines of the connector that depends on the numbers of line in the connector. The following figures demonstrate the result of dragging the orange point along the red arrow.
![]() |
![]() |
Figure 3.6 - Drag on break point |
There is no boundary for the modification of the connectors. You can create break points anywhere you like on the connector, and the lines in the connector will not be aligned with the horizontal or vertical axis. If you drag a line, a new breakpoint will be created at the drag point and two lines will be created. If you wish to modify a line to be horizontal or vertical, you may do this by hand.
The following figures demonstrate modifications to the connector. The new breakpoint is created when you drag the connector away from its starting point. When you release the mouse click the breakpoint will be finalized.
![]() |
Figure 3.7 - Oblique Connector Style |
The figure below shows the modification to the connector with the oblique connector style. The connector is divided into two lines and a new break point is created on the connector.
![]() |
Figure 3.8 - Create a break point by drag on the line |
![]() |
You can use the Point Eraser ![]() |
By applying the Curve connector style, the connector will be arranged as a smooth curve line. To change the curve shape, simply add/move/remove point(s) on the connector and the curve will be automatically re-calculated according to the points. The Curve connector style makes the connectors much easier to route in complex diagrams to avoid crossing connectors.
The following figures demonstrate the modifications to the connector. The new breakpoint is created when you drag the connector away from its starting point. When you release the mouse click the breakpoint will be finalized. Another breakpoint is created in the middle of the connector to make a curvature.
![]() |
Figure 3.9 - Curve Connector Style |
![]() |
Figure 3.10 - Create a break point by drag on the line |
The behavior of the Round Oblique connector is the same as that of the Oblique connector style. The only difference is the corners of the connector using Round Oblique style will appear rounded.
![]() |
Figure 3.11 - Round Oblique Connector Style |
The behavior of Round Rectilinear connector style is the same as that of Rectilinear connector style. The only difference is the corners of the connector using Round Rectilinear style will appear rounded.
![]() |
Figure 3.12 - Round Rectilinear Connector Style |
In Agilian, with the Follow Diagram feature, you do not need to set connector style one by one if you want to change all connectors in the diagram. When you right-click on a diagram you can set its default connector style from its popup menu, so that once the diagram connector style is changed, all connectors whose connector style is set to 'Follow Diagram' will be updated to the new style.
Each shape has a property called Connection Point that specifies how the connection points of the connectors should move if the shape is being moved. Unlike the connector style that is connector oriented, the connection point style is shape oriented.
![]() |
Figure 3.13 - Select Connection Point Style Dialog |
![]() |
Figure 3.14 - Properties Table |
![]() |
Figure 3.15 - Round the shape |
![]() |
Figure 3.16 - Follow center |
Pinning a connection end point allows the pinned end point of a connector to be fixed, no matter how the connecting shapes are moved. In figure below, the connection end point linking the class Bank is pinned to the location of the getAccount operation.
![]() |
Figure 3.17 - Pin a connector point |
In Agilian a connecting end point is unpinned by default. If a connecting end point is unpinned, its location will be determined by the connection point style of the connecting shape.
To pin a connection and an end point:![]() |
Figure 3.18 - Toggle the pin state |
All of the shapes have a fill color property, which allows you to select a solid fill color or a gradient fill color as well as define its transparency.
To format fill color for shapes, select the desired shapes and perform one of the following actions:![]() |
Figure 3.19 - Format Fill Color Dialog |
Field | Description |
---|---|
Fill Style | Select the fill style of the fill color. It can either be Solid (a single color) or Gradient (a fill color that is mixed by two colors). |
Transparency | Specify the transparency of the fill color. The greater the value, the more transparent is the shape. 0 (zero) transparency makes the fill color completely opaque, while 100 (one hundred) transparency makes the fill color completely transparent. You can adjust the transparency by dragging the slider, or by typing the value in the text field. Alternatively, you can click the Opaque button ![]() ![]() |
Preview | The Preview pane displays a rectangle that is filled with the editing fill color. The background is checked so that you can also preview the transparency of the fill color as well. |
Save as Default |
To save the current fill color as the default fill color for new shapes, click the Set as Default button. |
![]() |
Figure 3.20 - Select Solid Fill Style |
Field | Description |
---|---|
Color | This field displays the current selected color. It will display the color name if the selected color is a default color (Black, White, Yellow, etc); otherwise the RGB value of the selected color will be displayed. |
Default Color List | The default color list displays a list of pre-defined colors. Each color is displayed with a color preview and a color name. You can view the RGB value of a color by moving the mouse pointer over the color. |
Custom Color Pane | The custom color pane displays a wider range of colors that you can choose from, and you may define a new custom color by clicking on the Custom...button. The new color will be added to the recent color list (located at the bottom two rows of the custom color pane) for later reuse. |
![]() |
Figure 3.21 - Select Gradient Fill style |
Field | Description |
---|---|
Color 1 | You can select the first color of the gradient from the Color 1 field. To select a color click the ... button or double-click on the color editor. A color chooser will appear for you to select a color. |
Color 2 | You can select the second color of the gradient from the Color 2 field. To select a color click on the ...button or double-click on the color editor. A color chooser will appear for you to select a color. |
Gradient Color Themes | The Gradient Color Themes pane displays a list of pre-defined gradient color themes. To add a new color theme select Color 1 and Color 2 then click the Add to Themes...button. Please note that you must select a combination of colors that does not already exist in the color themes. To rename a theme click on the Rename...button or double-click on the desired theme. An input dialog will appear for you to enter a new name. To remove a theme select the theme and click on the Remove button, or use the Delete key instead. |
Gradient Style | The Gradient Style pane allows you to select the gradient style of the gradient fill color (the angle of how the gradient color is drawn). There are sixteen pre-defined gradient styles, which are shown as toggle buttons in the Gradient Style pane. To select a gradient style to use click on one of the styles. |
![]() |
Figure 3.22 - Format Line Dialog |
Field | Description | ||
---|---|---|---|
Style | Select the style (stroke) of the line. You can select one of the 23 styles (including "None" , which means no line) to apply in the combo box. A preview will be shown for each of the style items. |
||
Weight | Adjust the weight (thickness) of a line. The greater the value, the thicker the line. You can use the up/down button to increase/decrease the line weight, or you can type directly into the text field. The line weight ranges from 1 to 20.
|
||
Color | Specify the line color. Click on the ... button beside the Color field to select a color, either from the Default page (which shows predefined colors) or from the Custom page (which shows a larger variety of colors, and allows you to define any custom colors). | ||
Transparency | Specify the transparency of the line. The greater the value, the more transparent the line. 0 (zero) transparency makes the line completely opaque, while 100 transparency makes the line completely transparent. You can adjust the transparency either by dragging the slider, or by typing the value in the text field. Alternatively you can click on the Opaque button ![]() ![]() |
||
Preview | The Preview pane displays a rectangle surrounded by the line with the selected line format applied. | ||
Save as Default Line Format | To save the current line format as the default line format for new shapes click the Set as Default button. |
![]() |
Figure 3.23 - Select Font dialog box |
Field | Description |
---|---|
Font Name | Select different types of font. The number of fonts depends on the fonts available in your computer. |
Font Style | Select the style of font. You can select one of the 4 styles, a preview will be shown for each of the style items. |
Font Color | Specify the font color. Just click on the ... button beside the Color field to select a color either from the Default page (which shows predefined colors) or from the Custom page (which shows a larger variety of colors, and allows you to define any custom colors). |
Font Size |
Select the size of font. You may either click on the default sizes or enter the font size in the text field. |
Preview | The Preview pane displays the selected font format. |
Format copier enables you to copy the fill, line and font settings of one shape to another.
To copy format of a shape to another:
1. Select the source shape.
![]() |
Figure 3.24 - Select the source shape |
2. Click Format Copier on the toolbar.
![]() |
Figure 3.25 - Click Format Copier |
3. Click on the targeted shape to apply the formatting.
![]() |
Figure 3.26 - Apply formatting |
With the configurable stereotype appearance including fill, line and font, stereotyped elements can be easily distinguished and emphasized in the diagram.
Here, a stereotype of class is used as an example.
1.Select main menu Tools > Configure Stereotypes.... to open Configure Stereotypes dialog box.
![]() |
Figure 3.27 - Select Configure Stereotypes...
|
![]() |
Figure 3.28 - Configure Stereotypes dialog box
|
![]() |
Figure 3.29 - Stereotype Specification
|
![]() |
Figure 3.30 - Check Use and edit Fill property
|
![]() |
Figure 3.31 - Format Fill dialog box
|
![]() |
Figure 3.32 - Check Use and edit Line property |
![]() |
Figure 3.33 - Format Line dialog box |
![]() |
Figure 3.34 - Check Use and edit Font property |
![]() |
Figure 3.35 - Select Font dialog box
|
After configuring stereotype appearance, click OK in the Stereotype Specification. Then, Click OK when returned to the Configure Stereotypes dialog box.
![]() |
Figure 3.36 - Stereotype appearance configured
|
1. Right-click on a shape and select Stereotypes > Stereotypes... from the popup menu to open the Class Specification Dialog.
![]() |
Figure 3.37 - Select Stereotypes... |
2. Select a stereotype in the All list, click Add Selected to add it to the Selected list.
![]() |
Figure 3.38 - Add a stereotype to Selected list
|
3. Click OK in the specification dialog box. The stereotype is applied to the model, and the stereotype’s appearance is applied to the shape.
![]() |
Figure 3.39 - Stereotype applied |
1. Select main menu Tools > Configure Stereotypes... to open the Configure Stereotype dialog box. Select a model type in Model elements and the target stereotype in Stereotypes. Click the Edit... button.
![]() |
Figure 3.40 - Select a model type and the target stereotype |
2. We will modify the stereotype fill color in this example. Click the ... button of the Fill property.
![]() |
Figure 3.41 - Modify the stereotype fill color
|
3. Select orange as fill color, click OK.
![]() |
Figure 3.42 - Select a fill color
|
4. When returned to the Stereotype Specification dialog box, ensure the Apply changes to stereotypes in current project option is selected, otherwise stereotypes already used in the current project will not be updated. After that, click OK to close the dialog box.
![]() |
Figure 3.43 - Return to Configure Stereotypes
|
5. The appearances of shape that assigned the changed stereotype are updated.
![]() |
Figure 3.44 - Appearances of shape updated |
|
|