Decorator (Domain-Specific Language Designer)

A decorator is a visual item that appears on an object, such as a shape or a connector, in the generated designer. You can use decorators to add labels, icons, and chevrons to an element, and you can add multiple decorators to each element. Fore more information, see How to: Add a Decorator.

The following table contains the types of decorators that you can use:

Decorator

Description

ExpandCollapseDecorator

An expand/collapse chevron that is assigned to an object.

IconDecorator

An icon that is assigned to an object.

TextDecorator

A text label that is assigned to an object.

ExpandCollapseDecorator (Connectors)

ExpandCollapseDecorator for connectors has the following properties:

Property

Description

Default

DisplayName

The name that will be displayed in the generated designer for this decorator.

Expand Collapse Decorator

Name

The name of the decorator.

ExpandCollapseDecorator

Notes

Informal notes associated with this decorator.

OffsetFromLine

The offset in inches of the decorator from the line relative to its default position.

0

OffsetFromShape

The offset in inches of the decorator from the shape relative to its default position.

0

Position

The default position of the decorator.

SourceTop

ExpandCollapseDecorator (Shapes)

ExpandCollapseDecorator for shapes has the following properties:

Property

Description

Default

DisplayName

The name that will be displayed in the generated designer for this decorator.

Expand Collapse Decorator

Name

The name of the decorator.

ExpandCollapseDecorator

Notes

Informal notes associated with this decorator.

HorizontalOffset

The horizontal offset in inches, relative to the default position of the decorator.

0

VerticalOffset

The vertical offset in inches, relative to the default position of the decorator.

0

Position

The default position of the decorator.

InnerTopLeft

IconDecorator (Connectors)

IconDecorator for connectors has the following properties:

Property

Description

Default

DefaultIcon

The path to the icon or image file to be displayed by default.

DisplayName

The name that will be displayed in the generated designer for this decorator.

Icon Decorator

Name

The name of the decorator.

IconDecorator

Notes

Informal notes associated with the decorator.

OffsetFromLine

The offset in inches of the decorator from the line relative to its default position.

0

OffsetFromShape

The offset in inches of the decorator from the shape relative to its default position.

0

Position

The default position of the decorator.

SourceTop

IconDecorator (Shapes)

IconDecorator for shapes has the following properties:

Property

Description

Default

DefaultIcon

The path to the icon or image file to be displayed by default.

DisplayName

The name that will be displayed in the generated designer for this decorator.

Icon Decorator

Name

The name of the decorator.

IconDecorator

Notes

Informal notes associated with the decorator.

HorizontalOffset

The horizontal offset in inches, relative to the default position of the decorator.

0

VerticalOffset

The vertical offset in inches, relative to the default position of the decorator.

0

Position

The default position of the decorator.

InnerTopLeft

TextDecorator (Connectors)

TextDecorator for connectors has the following properties:

Property

Description

Default

DefaultText

The default text to be displayed when the decorator is unmapped.

Label

DisplayName

The name that will be displayed in the generated designer for this decorator.

Label

FontSize

The font size for the text displayed in the decorator.

8

FontStyle

The font style for the text displayed in the decorator.

Regular

Name

The name of the decorator.

Label

Notes

Informal notes associated with the decorator.

OffsetFromLine

The offset in inches of the decorator from the line relative to its default position.

0

OffsetFromShape

The offset in inches of the decorator from the shape relative to its default position.

0

Position

The default position of the decorator.

TargetBottom

TextDecorator (Shapes)

TextDecorator for shapes has the following properties:

Property

Description

Default

DefaultText

The default text to be displayed when the decorator is unmapped.

NameDecorator

DisplayName

The name that will be displayed in the generated designer for this decorator.

Label

FontSize

The font size for the text displayed in the decorator.

8

FontStyle

The font style for the text displayed in the decorator.

Regular

Name

The name of the decorator.

NameDecorator

Notes

Informal notes associated with the decorator.

HorizontalOffset

The horizontal offset in inches, relative to the default position of the decorator.

0

VerticalOffset

The vertical offset in inches, relative to the default position of the decorator.

0

Position

The default position of the decorator.

Center

See Also

Concepts

Walkthrough: Customizing the Domain-Specific Language Definition

Domain-Specific Language Designer Terminology Overview

How to: Intercept a Click on an Icon Decorator

Domain-Specific Language Tools Glossary