| view box e1 e2 l1 label anchor |
view := RTView new.
label := RTLabel new elementOn: 'Class IIa'.
box := RTBox new
color: Color black;
height: 10;
width: 1.
e1 := box element @ RTDraggable.
e2 := box element @ RTDraggable.
l1 := RTStyledMultiLine new
color: Color black;
solidLine;
edgeFrom: e1 to: e2.
view addAll: (Array with: e1 with: e2 with: l1 with: label).
anchor := RTAnchorConstraint new
element: label;
edge: l1;
balance: 0.5;
minDistance: -2;
build.
RTHorizontalLineLayout new on: view elements.
view elements pairsDo: [ :a :b | b translateBy: 100 @ 0 ].
^ view