Custom Stereotypes

UML supports a large number of stereotypes, which are an inbuilt mechanism for logically extending or altering the meaning, physical appearance and syntax of a model element. Different model elements have different stereotypes associated with them. For more information on the use of stereotypes in Enterprise Architect, see the UML Stereotypes topic.

In Enterprise Architect you can create new stereotypes with their own custom appearance. The stereotypes can be altered to make use of metafiles (image files) and customized colors, or you can make use of an Enterprise Architect Shape Script to make new element shapes to determine the shape and dimensions of the element.

To add your own custom stereotypes, follow the steps below:

  1. From the main menu, select Settings | UML. The UML Types dialog displays, defaulted to the Stereotypes tab.
     
    StereotypeDlg
     
  2. Type or select a Stereotype name.
  3. Select a Base Class from the drop-down list.
  4. To associate a Metafile with this stereotype, click on the Metafile radio button and the Assign button, and locate the required .emf or .wmf file.
  5. Enter optional Notes and select Default Colors for this stereotype.
  6. Click on the Save button to save the stereotype.

The table below describes the functionality of the Stereotypes tab.

Option

Use to

Stereotype

Specify the name of the stereotype.

Group name

Enable grouping of stereotype features by a plural name, for attributes and operations, which is shown on diagrams in the attribute and operations compartments.

Base Class

Enable the stereotyped element to inherit the base characteristics from a pre-existing element type.

Notes

Type any notes concerning the stereotype (not the elements to which the stereotype is to be applied).

Override Appearance

 

None

Switch to the default element appearance.

Metafile

Enable an image file to be used for the appearance of the stereotype.

Shape Script

Specify custom shapes for the stereotype using the Enterprise Architect Shape Scripting language. For more information see the Shape Scripts topic.

Assign

Add the associated metafile or Shape Script from the stereotyped element.

Remove

Remove the associated metafile or Shape Script from the stereotyped element.

Default Colors

 

Fill

Set the default background color of the element.

Border

Control the border color.

Font

Control the color of the stereotype font.

Reset

Reset the appearance of the element to the default element appearance.

Note:

You can transport these custom stereotype definitions between models, using the Export Reference Data and Import Reference Data options on the Tools menu.