Applies ToVisio Premium 2010 Visio 2010 Visio Standard 2010 Visio 2007 Visio Standard 2007

In a class diagram, a class describes a set of objects with similar structure, behavior, and relationships. The name of a class must be unique within its package.

Class shape.

The class shape starts as a rectangle with three rows. The name of the class is in the top row. The other two rows are for methods or operations that the class may use.

See Also

Create a UML class diagram

In a static structure diagram, a class UML Class shape icon describes a set of objects with similar structure, behavior, and relationships. Classes are declared in class (static structure) diagrams and represent concepts in the systems being modeled. The name of a class must be unique within its package.

Name a Class shape and add other property values

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view or the shape that represents the element in a diagram.

Tip: Control which property values display on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Hide the attributes or operations sections of a Class shape

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Control which property values are displayed on the Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Hide template parameters

Right-click the shape, click Shape Display Options, and then, under Suppress, check Template Parameters.

Indicate a realizes relationship

Right-click the Class shape, click Shape Display Options, and then select Realization Link. Select the shape, and then drag the control handle Control handle image - yellow diamondto create a Realizes arrow.

Create a diagram owned by the Class shape

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Or, right-click the shape in the Model Explorer and click New Diagram.

Navigate to other views of the Class shape

Right-click the shape, click Views, select the view you want, and then click OK.

Show, in a view, the relationships between the class and other elements

Right-click the shape, and then click Show Relationships.

Properties

Select a heading below to open it and see the details about this shape's properties.

Property

Description

Name

Type a name for the class. Classes in the same package must have unique names.

Full path

The UML Model Diagram template automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

Visibility

Choose the type of visibility, public, private, or protected, that applies to the class.

IsRoot

Select to indicate that the class can't have ancestors.

IsLeaf

Select to indicate that the class can't have descendants.

IsAbstract

Select to indicate that the class is abstract and that no instances can be created for the class.

IsActive

Select to specify that an object of the class maintains its own thread of control.

Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.

IsActive

Documentation

Use the properties to choose the components which implement a class.

Property

Description

Choose The Components Which Implement This Class

Lists the components in your model. Select the components you want.

Select All

Click to select all the components in the list.

Deselect All

Click to deselect all the components in the list.

Use the Receptions category to add, edit, or delete receptions.

Property

Description

Receptions

Lists the receptions you have defined for the classifier.

To quickly edit the most commonly used settings for a reception, click a field in the Receptions list, and then select or type a value.

To access all of the settings for a reception, select the reception in the Receptions list, and then click Properties.

  • Reception  Type a name for the reception.

  • Signal  Choose the signal that the classifier is prepared to handle.

  • Visibility  Choose the visibility (public, private, or protected) that applies to the reception. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.

  • Polymorphic  Select if the response to the signal depends on the state of the classifier and can be overridden on subclasses. Leave unselected if the response to the signal is always the same.

  • Scope  Choose instance if the reception is applicable to each object created by the classifier. Choose classifier if the reception is applicable only to the classifier itself.

New

Click to add an undefined reception to the list of receptions for the classifier.

To quickly edit the most commonly used settings for a reception, click a field in the Receptions list, and then select or type a value.

To access all of the settings for a reception, select the reception, and then click Properties.

Duplicate

Click to add a new reception to the list with the same property values as the selected reception.

Delete

Click to delete the selected reception from the list.

Move Up/Move Down

After you select a reception, click to change the order in which the reception is stored. You can only reorder within the same classifier.

Use the Template Parameters dialog box to add, edit, or delete template parameters.

Property

Description

Template Parameters

Lists the parameters you have defined for the class.

  • Template Parameter  To edit the template parameter name, click a field in the column, and then type the new name.

  • Type  To edit the template parameter type, click a field in the column, and then select the type.

New

Click to add a template parameter to the list.

Duplicate

Click to add a new parameter to the list with the same property values as the selected parameter.

Delete

Click to delete the selected parameter from the list.

Move Up/Move Down

After you select a parameter, click to change the order in which the parameter is stored. You can only reorder within the same classifier.

See Also

Create a UML static structure diagram

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.