Share via


Adding Shapes and Connectors

You can represent different instances of domain classes on the diagram of the generated designer by using shapes, for example, geometry shapes, compartment shapes, image shapes, port shapes, and swimlanes. There is also a connector shape to represent instances of domain relationships (also called links).

For information about how to map domain classes and relationships to shapes and connectors, see Mapping Shapes and Connectors. Every shape and connector on a diagram must be a child of either the diagram or another shape.

Shape Definitions

Geometry Shapes

Geometry shapes do not have internal divisions. You can add a geometry shape by clicking a geometry shape in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. For more information, see Properties of Geometry Shapes.

Compartment Shapes

Compartment shapes have internal compartments that can be used to display domain properties or other elements. You can add a compartment shape by clicking a compartment shape in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. You can add a compartment to a compartment shape by right-clicking the compartment shape on the diagram, pointing to Add, and then clicking Compartment. For more information, see Properties of Compartment Shapes.

Image Shapes

Image shapes display images. You can define an image for an image shape by setting its Image property to an image resource file. You can add an image shape by clicking an image shape in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. For more information, see Properties of Image Shapes.

Port Shapes

Ports are small squares that attach to the outline of another shape. Ports can be moved only along the outline of the other shape. Port shapes are used primarily in component models. You can add a port shape by clicking a port shape in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. For more information, see Properties of Port Shapes

Swimlanes

Swimlanes are vertical or horizontal lines that are used to divide the diagram into different sections. You can add a swimlane by clicking a swimlane in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. For more information, see Properties of Swimlanes.

Connectors

Connectors are lines that represent domain relationships. They have source ends and target ends that can have different styles, for example, arrow or hollow arrow. You can also choose the routing style of a connector; that is, whether the connector is drawn as an angled line or a straight line. You can add a connector by clicking a connector in the Toolbox and dragging it to the Domain-Specific Language Tools definition diagram. For more information about connectors, see Properties of Connectors.

Shape Inheritance

A shape can inherit from another shape. However, the shapes must be the same kind. For example, only a geometry shape can inherit from a geometry shape. Inherited shapes have the compartments and decorators of their base shape. Connectors can inherit from connectors.

Change History

Date

History

Reason

July 2008

Rewrote and refactored project

Content bug fix.