Composite Elements

Enterprise Architect supports Composite elements for Classes, Objects, Use Cases and such. A Composite element is a pointer to a child diagram.

Create a Composite Element

To set Composite elements from the element context menu, follow the steps below:

  1. Create the element to set as a Composite element.
  2. Right-click on the element in the diagram and select the Advanced | Make Composite context menu option.

Note:

If the Make Composite option is not listed in the context menu, the option is not available for the type of element you have selected.

The element displays as follows:
 
CompositeObject
 

Note the small icon in the bottom right hand corner indicating that this is now a Composite element.

  1. Double-click on the Composite element to access the child diagram that it points to.

The Composite element and its child diagram are represented in the Project Browser as follows:

CompositeObject-ProjectBrowser

Note that ClassX, ClassY and ClassZ are elements in the child diagram.

Alternative Notation

Composite elements can show their contents instead of their usual notation. To enable this, right-click on the element to open the context menu, then select the Advanced | Show Composite Diagram option.

The Automation Interface

Automation support is available for Composite elements. Element has an Elements collection and a Diagrams collection.