Semantics
A component represents a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces.
Procedure for creating component
In order to create Component,
1. | Click [Toolbox] -> [Component] -> [Component] button. |
![ch05_723](ch05_723.jpg)
2. | Click at the position where Component will be placed in the [main window]. And at the quick dialog, enter component name and press [Enter] key. The result is as follows. |
![ch05_724](ch05_724.jpg)
Procedure for adding resident element
In order to add resident element to component,
1. | Select [Collection Editor...] popup menu of component. |
![ch05_725](ch05_725.jpg)
2. | Or click button in [Residents] property on properties window. |
![ch05_727](ch05_727.jpg)
3. | At the [Residents] tab of the [collection editor], you can add resident element by using button. |
![ch05_729](ch05_729.jpg)
4. | At the [Select a Resident] dialog, select resident component. |
![ch05_730](ch05_730.jpg)
5. | The component is assigned to component as resident component and is shown as follows. |
![ch05_731](ch05_731.jpg)
Procedure for creating providing relationship
In order to create providing relationship,
1. | Click [Toolbox] -> [Component] -> [Realization] button |
![ch05_732](ch05_732.jpg)
2. | Drag from component and drop to interface in the [main window]. |
![ch05_733](ch05_733.jpg)
3. | The result is as follows. |
![ch05_734](ch05_734.jpg)
Procedure for creating requiring relationship
In order to create requiring relationship,
1. | Click [Toolbox] -> [Component] -> [Dependency] button. |
![ch05_735](ch05_735.jpg)
2. | Drag from component and drop to interface in the [main window]. |
![ch05_736](ch05_736.jpg)
3. | Finally, the interface requiring relationship is created. |
![ch05_737](ch05_737.jpg)
Procedure for creating providing interface of class.
In order to create providing inteface of class, use shortcut creation syntax.
1. | Double-click class. At the quick dialog, enter "-@" staring and interface name, separate interface names by "," character. |
![ch05_738](ch05_738.jpg)
2. | And press [Enter] key. Several interfaces provided by selected class is created and arranged automatically. |
![ch05_739](ch05_739.jpg)
Procedure for creating requiring interface of class.
In order to create requiring inteface of class, use shortcut creation syntax.
1. | Double-click class. At the quick dialog, enter "-(" or "-->", and enter interface names, separate interface names by "," character. |
![ch05_740](ch05_740.jpg)
2. | And press [Enter] key. Several interfaces required by selected class is created and arranged automatically. |
![ch05_741](ch05_741.jpg)
Procedure for creating port
In order to create port on a component,
1. | Click [Toolbox] -> [Component] -> [Port] button. |
![ch05_742](ch05_742.jpg)
2. | And click the component where the port will be contained in the [main window]. |
![ch05_743](ch05_743.jpg)
3. | A port is created on the component. At the quick dialog, enter the port name and press [Enter] ken to be complete. |
![ch05_744](ch05_744.jpg)
4. | The result is as follows. |
![ch05_745](ch05_745.jpg)
Procedure for creating view by dragging port
You can create port by dragging port from [model explorer] to main diagram.
1. | Drag port in the [model explorer] and drop on the component in the main diagram. |
![ch05_746](ch05_746.jpg)
2. | A port appears on the component. If it is not dropped on the component but on the other area of the diagram, component with port will be created |
![ch05_748](ch05_748.jpg)
Procedure for creating part
In order to create part,
1. | Click [Toolbox] -> [Component] -> [Part] button. |
![ch05_749](ch05_749.jpg)
2. | And click the component where the part will be contained in the [main window]. |
![ch05_750](ch05_750.jpg)
Procedure for creating connector
In order to create connector,
1. | Click [Toolbox] -> [Component] -> [Connector] button. |
![ch05_751](ch05_751.jpg)
2. | Drag from one part and drop to the other part in the [main window]. |
![ch05_752](ch05_752.jpg)
3. | The connector between two parts is created finally as follows. |
![ch05_753](ch05_753.jpg)
|