Composite structure diagram is a kind of UML diagram that visualizes the internal structure of a class or collaboration. It is a kind of component diagram mainly used in modeling a system at micro point-of-view.
Creating composite structure diagram
Perform the following steps to create a UML composite structure diagram.
- Select Diagram > New from the application toolbar.
- In the New Diagram window, select Composite Structure Diagram.
- Click Next.
- Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
- Click OK.
Creating class
To create a class in composite structure, click Class on the diagram toolbar and then click on the diagram.
A class will be created.
Creating part
To create a part inside a class:
- Move your mouse pointer over the class.
- Click on the Resource Catalog button.
- Select New Part from Resource Catalog.
A part is created.
Creating port
To create a port that attaches to a class:
- Move your mouse pointer over the class.
- Click on the Resource Catalog button.
- Select New Port from Resource Catalog.
A port is created.
Specifying type of port
Right-click the port and select Open Specification… from the pop-up menu. The Port Specification window appears.
Click the combo box of Type and select a class.
Click OK button to apply the changes. Type will be shown on the caption of the port.
Creating connector
To create connector, click Connector on the diagram toolbar.
Drag from the source shape, move the mouse over the target shape and then release the mouse button to create the connector.
Continue to complete the diagram.