Expanding / hiding class compartments in a UML diagram:
There are several methods of expanding the various compartments of class diagrams.
•Click on the + or - buttons of the currently active class to expand/collapse the specific compartment.
•Use the marquee (drag on the diagram background) to mark multiple classes, then click the expand/hide button. You can also use Ctrl+Click to select multiple classes.
•Press Ctrl+A to select all classes, then click the expand/collapse button, on one of the classes, to expand/collapse the respective compartments.
Expanding / collapsing class compartments in the Model Tree:
In the Model Tree classes are subelements of packages and you can affect either the packages or the classes.
•Click the package / class you want to expand and:
▪Press the * key to expand the current package/class and all sub-elements
▪Press the + key to open the current package/class.
To collapse the packages/classes, press the - keyboard key.
Note that you can use the standard keyboard keys, or the numeric keypad keys to achieve this.
Clicking the visibility icon to the left of an operation , or property , opens a drop-down list enabling you to change the visibility status. You can also change the type of visibility symbols that you want to see.
•Click a class in the diagram window, click the Styles tab and scroll down the list until you find the Show Visibility entry.
You can choose between the UModel type shown above, or the UML conformant symbols shown below.
UModel now allows you to individually display the attributes or operations of a class, as well as define which should be shown when adding them as new elements. Note that this it now possible to show/hide object slots i.e. InstanceSpecifications using the same method.
Right-click a class, e.g. SavingsAccount, and select the menu option Show/Hide Node content.
Deselecting a protected check box in the Attributes group, deselects the protected attributes in the preview window.
Having confirmed with OK, the protected attributes in the class are replaced with ellipsis "...". Double clicking the ellipsis opens the dialog box.
Note that individual attributes can be affected by only deselecting the check box in the preview window.
Showing / Hiding class attributes or operations - Element styles
UModel allows you to insert multiple instances of the same class on a single diagram, or even different diagrams. The visibility settings can be individually defined for each of these "views" to the class. The screenshot below shows two views to the same class i.e. SavingsAccount.
The "When new elements are added and not hidden by Element Styles" option allows you to define what will be made visible when new elements are added to the class. Elements can be added manually in the model diagram and in the Model Tree, or automatically during the code engineering process.
The Show elements option displays all new elements that are added to any view of the class. For example, the interestRate:float attribute has been hidden in both "views" of SavingsAccount, leaving the minimumBalance attribute visible. The Show elements radio button is active for the left-hand class.
Double-clicking the ellipsis "..." in the attribute compartment of the left-hand class shows that the "Show elements" radio button is active.
Double-clicking the ellipsis "..." in the attribute compartment of the right-hand class shows that the "Hide elements (except those added to this node)" radio button is active.
Clicking the left-hand class and pressing F7, (or clicking the class in the Model Tree and pressing F7) adds a new attribute (Property1) to the class.
The new element is only visible in the left-hand class, because "Show elements" is set as active. The right-hand class setting is "Hide elements...", so the new element is not shown there.
Clicking the right-hand class and pressing F7 adds a new attribute (Property2) to the class. This new attribute is now visible because the Hide elements... setting has the qualifier "except those added to this node", where "node" generically means this class, or modelling element.
The Property2 attribute is also visible in the left hand class, because the setting there is "Show elements".
|Note:||Tagged values of hidden elements are also hidden when you select the hide option.|
To display .NET properties in their own compartment, select the "Show .NET properties in own compartment" option in the Styles tab.
To display .NET properties as associations, right-click a C# property as shown below, and select Show | All .NET Properties as Associations from the context menu.
UModel automatically enables syntax coloring, but lets you customize it to suit your needs. The default settings are shown below.
To change the default syntax coloring options (shown below):
1.Switch to the Styles tab and scroll the SC prefixed entries.
2.Change one of the SC color entries e.g. SC Type to red.
To disable syntax coloring:
1.Switch to the Styles tab and change the Use Syntax Coloring entry to false.
2.Use the Attribute Color, or Operation Color entries in the Styles tab to customize these items in the class.