UML diagram elements

A diagram element is a textual and graphical element that represents a component of an application or a system in a Unified Modeling Language (UML) diagram.

The items that you add to populate UML diagrams are called diagram elements. Diagram elements, which can also be called shapes, graphically and textually represent the components in the application or real-world system that the diagram illustrates. Different types of UML diagrams contain different diagram elements to illustrate the objects or components that the diagram represents. For example, class diagrams, which show the static structure of a system, contain diagram elements that represent classes, whereas sequence diagrams, which show how objects interact with each other, contain diagram elements that illustrate objects and the messages that they send to and receive from each other.

You can change how diagram elements appear. For example, you can change the colors for lines, borders, backgrounds, fonts, and drop shadows. You can set default preferences for all the diagram elements that you create, or you can change the settings for individual elements in a diagram.

Compartments

A compartment is a divided section within a UML diagram element. A compartment organizes the items in a diagram element so that it is easy to differentiate between them. Individual compartments group similar items together. An element contains a name compartment, and can contain other compartments. For example, the UML representation of a class is a rectangle that is divided into three compartments. The top compartment shows the class name, the middle compartment lists the class attributes, and the bottom compartment lists the operations of the class.

You can specify whether to show or hide compartments and compartment titles within diagram elements.

Connectors

Connectors are specific elements in UML diagrams that represent the relationships between diagram elements. A connector appears as a line and can show all or part of the semantic information about the represented relationship.

You can change the properties for how connectors appear in a diagram. For example, you can change their color, set whether they should avoid obstacles or link elements along the shortest distance, or specify the smoothness of the lines.

By default, connectors have an oblique line style which makes them appear as slanted or angled lines. Oblique lines can be easier to drag and more space-efficient in complex diagrams. You can also change this setting to a rectilinear style that shows horizontal and vertical lines. You can add bend points to connectors to make right angles in them to better organize a diagram.

Similar to diagram elements, you can set default preferences for all connectors that you add to diagrams, or for individual connectors in a specific diagram.


Feedback