Skip to main content

Component Diagram

Overview

Component diagrams can be used to describe the internal structure of components and the relationships between them.
This page explains the operations for using component diagrams in the following order.

  • Place component diagram
  • Define the component
  • Define relationships

We also provide the following features to assist users in their modeling:
These will also be explained in turn.

  • Set display content

Component Diagram

Place component diagram

To place a component diagram, follow these steps:

Add component diagram

Operating instructions
  1. Select the package in the model navigator and click [Add Model] > [Component Diagram] in the context menu.
  2. The component diagram is placed in the child element of the selected package.

Define the component

To define a component, follow these steps:

Add component

Operating instructions
  1. Drag and drop [Component] from the toolbox onto the displayed component diagram.
  2. The component is placed in the sibling element of the displayed component diagram.
Elements that can be added from the toolbox

You can add the following elements displayed in the toolbox to the component diagram.

IconName
PackagePackage
ComponentComponent
PortPort
ClassClass
InterfaceInterface
NoteNote
LabelLabel
Add ShapeShape

Place ports as port shapes in the following elements:

  • Component

Add stereotypes to components

To add a stereotype, follow these steps:

Add stereotype

Operating instructions
  1. Select a component.
  2. Click the Add button in the Basic information > Stereotype field in the Property Inspector to display the choices.
  3. Select a stereotype and press the [OK] button to set the stereotype to the component and display the stereotype at the top of the shape.
tip

Stereotype choices can be defined in the package model's Detail view.

tip

Once you have added a stereotype, you can edit it from the component diagram by following these steps:

  1. Double-click the stereotype displayed in the component to enter editing state.
  2. If you change the stereotype and confirm the edit, it will be reflected on the component diagram and the component stereotype will be changed.
tip
  • If you want to display an existing component on the component diagram, you can display it by dragging and dropping the component on the model navigator onto the component diagram.
  • You can define the internal structure of a component by dragging and dropping components and classes onto the component shape on the diagram.
    Components and classes defined as internal structures are added as child elements of the component.

Define the relationship

To define an association, follow these steps:

Operation to add relation

Operating instructions
  1. Move the pointer over the component you want to associate.
  2. Drag the [▲] icons that appear on all sides of the component and drop them onto the interface you want to associate.
  3. A list of relationships that can be added will be displayed. Select the relationship you want to add, and the selected relationship will be added.
Related information that can be added

The following relationships are available in component diagrams:

IconName
RequiresDepends
RelationshipRelationship
UseUse
Related (unidirectional)Related (unidirectional)
EmbeddedOwned
AggregationAggregation
GeneralizationInheritance
RealizationRealization

Add stereotypes to associations

To add a stereotype, follow these steps:

Add stereotype to relation

Operating instructions
  1. Select an association.
  2. Double-click the grayed-out [<<stereotype>>] to enter editing mode.
  3. Enter the stereotype you want to set, the stereotype will be set to the relationship, and the stereotype will be displayed in the relationship in the component diagram.
tip

You can also define relationships for ports placed as child elements of components.

tip

Component diagrams can also define relationships between classes.
For more information, see Class Diagram.

Set display content

You can display only the information of interest in component diagrams without changing the model.
To configure what the visibility of a relationship displays, follow these steps:

Simply display text

Operating instructions
  1. Display the component diagram whose display you want to switch.
  2. Toggle the check mark on the visibility checkbox in the [Relationship] group on the [UML Diagram] tab in the Inspector.

Restrictions

  • Interfaces are represented differently from the UML standard (classes cannot be displayed and are represented as circles).
  • Parts cannot be defined.
  • The connection between ports is different from the UML standard, and it is also possible to connect directly with a connector without going through an interface.