Condividi tramite


Decorator Class

Definition

Class to encapsulate the way ShapeFields and child shapes are used to represent Notation Decorators

public ref class Decorator abstract
public abstract class Decorator
type Decorator = class
Public MustInherit Class Decorator
Inheritance
Decorator
Derived

Constructors

Decorator(ShapeField, PointD, Boolean)

Constructs a new decorator.

Decorator(ShapeField, PointD)

Constructs a new decorator.

Properties

CanMove

Whether this decorator can be moved. A decorator can be moved only if it is instantiated as moveable and also requires a host.

DecoratorAnchorMargins

Helper to get the size of the Margins specified in the ShapeField's anchoring.

Field

The ShapeField item that this decorator specifies.

Offset

Gets or sets the offset used to modify the default position of the decorator specified by position. How it works:

For non-centered shape positions the X and/or Y offset coordinate is simply added to the X and/or Y position of the decorator.

For centered shape positions, the X and/or Y offset coordinate is treated as a percentage in the range 0 to 1.0, and is added to 0.5 to modify the position of the decorator.

For connector decorators, the X and/or Y offset coordinates modify the distance between the decorator and the line and/or shape the line connects to. The greater the offset, the greater the distance.

For example, if a shape decorator position of OuterMiddleLeft is specified, and the offset is (-0.1, 0.1), then the decorator will be shifted 0.1 units to the left and placed 60% of the way between the top and bottom of the shape.

RequiresHost

Does this position require that the parent shape have a host added?

Methods

AssociateValueWith(Store, AssociatedPropertyInfo)

Associates this decorator with a domain property.

AssociateValueWith(Store, Guid, AssociatedPropertyInfo)
AssociateValueWith(Store, Guid)

Associates this decorator with an IMS property on the ShapeElement hosting the decorator.

AssociateVisibilityWith(Store, AssociatedPropertyInfo)

Associates this decorator's visibility with domain property.

AssociateVisibilityWith(Store, Guid, AssociatedPropertyInfo)

Associates this decorator's visibility with a domain property, when the shape is mapped to an instance of the given domain class. Use this method when there are multiple domain classes that this decorator can be mapped to.

AssociateVisibilityWith(Store, Guid)

Associates this decorator's visibility with an IMS property on the ShapeElement hosting the decorator.

ConfigureHostShape(ShapeElement)

Configures a host shape for use with this decorator.
If the given parent does not have a host shape for this decorator, a new one will be created. If a host shape already exists, settings for this decorator will be re-applied to the existing host shape; a new host shape will not be created.

GetHostShape(ShapeElement)
GetValue(ShapeElement)

Gets the value associated with this decorator and the given parent shape.

GetVisible(ShapeElement)

Gets the visibility of this decorator in the context of the given parent shape.

OnAfterOffsetChanged()

Hook for derived classes to make modifications to the decorator after the offset changes.

RepositionHostShape(DecoratorHostShape)

Method to reposition host shape and set its visibility.

SetValue(ShapeElement, Object)

Sets the value associated with this decorator and the given parent shape.

SetVisible(ShapeElement, Object)

Sets the visibility of this decorator in the context of the given parent shape.

UpdateDecoratorHostShapes(ModelElement, Guid)

Given a model element, finds all mapped presentation elements, and updates the corresponding decorator host shape bounds.

UpdateDecoratorHostShapes(ModelElement)

Given a model element, finds all mapped presentation elements, and updates the corresponding decorator host shape bounds.

UpdateHostShapeVisibility(DecoratorHostShape)

Applies to