11.10: Forwarding Events

Deep into Pharo · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    11.10: Forwarding Events

    Methods of the visualization given in the previous section may be moved by a simple drag and drop. However, it may be wished that the methods have a fixed position, and only the classes can be drag-and-dropped. In that case, the message forward has to be sent to the interaction. Consider:

    view nodes: ROShape withAllSubclasses forEach: [:cls |
        view interaction forward.
        view shape rectangle
                size: #linesOfCode.
        view nodes: cls methods.
        view edges: cls methods from: #yourself toAll: [ :cm | cls methods select: [ :rcm | cm
            messages anySatisfy: [:s | rcm selector == s ] ] ].
        view treeLayout
    ].
    view interaction action: #browse.
    view edgesFrom: #superclass.
    view treeLayout.
    

    Moving a method will move the class instead. It is often convenient to drag and drop more than one element. As most operating systems, Mondrian offers multiple selection using the Ctrl or Cmd key. This default behavior is available for every node. Multiple selection allows for a group of nodes to be moved.


    This page titled 11.10: Forwarding Events was last modified on Mon, 26 Jul 2021 15:16:49 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.