Opening the book…
The message edgesFrom: is used to draw one edge at most per node. A variant of it is edges:from:toAll:. It supports the definition of several edges starting from a given node. Consider the dependencies between classes. The script:
view shape rectangle
size: [:cls | cls referencedClasses size ];
withText.
view nodes: ArrayedCollection withAllSubclasses.
view shape arrowedLine.
view
edges: ArrayedCollection withAllSubclasses from: #yourself toAll: #referencedClasses.
view circleLayout.
The obtained visualization is given in Figure \(\PageIndex{1}\).
String and CompiledMethod clearly shows up. These two classes contains many references to other classes. We also see that text: makes a shape contain a text.
Mondrian provides a set of utility methods to easily create elements. Consider the expression:
view edgesFrom: #superclass
edgesFrom: is equivalent to edges:from:to: :
view edges: Collection withAllSubclasses from: #superclass to: #yourself.
itself equivalent to
view
edges: Collection withAllSubclasses
from: [ :each | each superclass ]
to: [ :each | each yourself ].
This page titled 11.5: Multiple Edges was last modified on Mon, 26 Jul 2021 15:16:48 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.