Stem Position - modelint/flatland-model-diagram-editor GitHub Wiki

When you look at an associative relationship on a class diagram, you see a number of places where icons and text may appear. Each such area is defined as a Stem Position.

Here are some example Stem Positions:

images/connector-subsystem/10_stem_position.png

In this example we see the class face and association Stem Positions defined on the binary assocation Connector Type.

Not that the same standard position may appear in more than one location on a Connector Type.

When the Connector is drawn, a distinct Stem will be displayed at each Stem Position, each with its own text and icon.

Identifiers

  1. Name + Diagram type

Stem Type Names are unique to each Diagram Type by policy.

Attributes

About

Describes the meaning associated with this Stem Position.

Type: Description

Stretch

For a class mult Stem Type, we just draw it the default length which is enough to meet an end of its binary association Connector. This is an example of a fixed (non-variable) length Stem Type.

A Unary Stem such as an initial transition in a state machine Diagram Type could be drawn to different lengths to accommodate whatever Line Adjacent Name might appear nearby. If it is multiiple lines of text, a longer Unary Stem might be desired. We can default to the minimum length, but the user can specify a longer stem as desired. This is an example of a free Elasticity.

A Ternary Stem like associative mult, on the other hand, is drawn from its root on a node face to meet a binary assoc Connector axis. So the length to the axis must be computed, but it must exceed the specified Minimum length described below. In this case the Elasticity is hanging since we can imagine the vine end hanging on a connector axis.

Type: Elasticity :: [ fixed | hanging | free ]

Minimum length

This value is used as the actual length with a fixed length Stem Type and as a minimum length where a hanging Stem Type is concerned.

For a fixed length Stem Type such as class mult and initial transition, the value always determines the distance between the root and vine ends of a corresponding Stem.

With a variable length stem like associative mult, this value prevents the stem from being too short. So an error is produced if there isn't enough distance between the root and the axis contact point. This distance should accommodate any drawn icons or adjacent labels as well as an asthetic, albeit possibly short stem.

Type: Distance