Changing arrow head types in RTMondrian

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing arrow head types in RTMondrian

Fuhrmanator
I'd like my visualizations showing inheritance to be UML-like. That is, I'd like arrow heads to be empty. I found some classes (RTEmptyArrowHead, etc.) and thought they might be the answer. However, I can't get it to work in the following code. Do those classes work?

I'm using Moose suite 6.0 on Windows 10.

| b line |
b := RTMondrian new.
b shape circle size: 3.
b nodes: RTShape withAllSubclasses.

"b shape arrowedLine withShorterDistanceAttachPoint."
line := RTEmptyArrow new.
b shape line withShorterDistanceAttachPoint.

b edgesFrom: #superclass.
b layout forceWithCharge: -500.
b build.
^ b view

Result of attempt to use RTEmptyArrow
Reply | Threaded
Open this post in threaded view
|

Re: Changing arrow head types in RTMondrian

Ben Coman
On Mon, Sep 12, 2016 at 5:10 AM, Fuhrmanator <[hidden email]> wrote:

>
> I'd like my visualizations showing inheritance to be UML-like. That is, I'd
> like arrow heads to be empty. I found some classes (RTEmptyArrowHead, etc.)
> and thought they might be the answer. However, I can't get it to work in the
> following code. Do those classes work?
>
> I'm using Moose suite 6.0 on Windows 10.
>
> | b line |
> b := RTMondrian new.
> b shape circle size: 3.
> b nodes: RTShape withAllSubclasses.
>
> "b shape arrowedLine withShorterDistanceAttachPoint."
> line := RTEmptyArrow new.
> b shape line withShorterDistanceAttachPoint.

I'm not a Roassal expert to provide a final answer,
but just to shortcut things in case there is a typo in the line above,
"line" is a variable and can't be sent as a message to the object
returned by #shape.
Are you getting any error message like "MessagenotUnderstood: XXXX>>line"  ?

cheers -ben

>
>
> b edgesFrom: #superclass.
> b layout forceWithCharge: -500.
> b build.
> ^ b view
>
> <http://forum.world.st/file/n4915133/RTEmptyArrowAttempt.png>
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Changing arrow head types in RTMondrian

Peter Uhnak
In reply to this post by Fuhrmanator
On Sun, Sep 11, 2016 at 02:10:25PM -0700, Fuhrmanator wrote:
> I'd like my visualizations showing inheritance to be UML-like. That is, I'd
> like arrow heads to be empty. I found some classes (RTEmptyArrowHead, etc.)
> and thought they might be the answer. However, I can't get it to work in the
> following code. Do those classes work?

Hi,

use can use `#head:` for `arrowedLine`, or `#headStart:`/`#headEnd` for `doubleArrowedLine`.

Note that you are `connect(ing)From: #superclass`, so you would have to reverse it if you want to use the `arrowedLine` (because the line points to the subclass), or use the `doubleArrowedLine`.

E.g.

| b |
b := RTMondrian new.
b shape circle size: 3.
b nodes: RTShape withAllSubclasses.

"b shape arrowedLine
        withShorterDistanceAttachPoint;
        head: RTEmptyNarrowArrow asHead."

"or"

b shape doubleArrowedLine
        withShorterDistanceAttachPoint;
        headStart: RTEmptyNarrowArrow asHead;
        headEnd: RTNoShape new.

b edges connectFrom: #superclass.

b layout forceWithCharge: -500.
b build.
^ b view

Peter

>
> I'm using Moose suite 6.0 on Windows 10.
>
> | b line |
> b := RTMondrian new.
> b shape circle size: 3.
> b nodes: RTShape withAllSubclasses.
>
> "b shape arrowedLine withShorterDistanceAttachPoint."
> line := RTEmptyArrow new.
> b shape line withShorterDistanceAttachPoint.
>
> b edgesFrom: #superclass.
> b layout forceWithCharge: -500.
> b build.
> ^ b view
>
> <http://forum.world.st/file/n4915133/RTEmptyArrowAttempt.png>
>
>
>
> --
> View this message in context: http://forum.world.st/Changing-arrow-head-types-in-RTMondrian-tp4915133.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Changing arrow head types in RTMondrian

Fuhrmanator
Thanks for all the pointers. Here's a working solution with the right direction for inheritance:

| b |
b := RTMondrian new.
b shape circle size: 20.
b nodes: RTShape withAllSubclasses.

b shape arrowedLine
        head: RTEmptyNarrowArrow asHead; "See other RTLineDecorationShape"
        withShorterDistanceAttachPoint;
                  color: (Color blue alpha:0.4).

b edges connectTo: #superclass.

b layout
        forceWithCharge: -500.

b build.
^ b view

Image with empty arrowed lines
Reply | Threaded
Open this post in threaded view
|

Re: Changing arrow head types in RTMondrian

Tudor Girba-2
Hi,

You seem to be having some fine!

Please keep the questions coming.

Cheers,
Doru


> On Sep 12, 2016, at 4:47 PM, Fuhrmanator <[hidden email]> wrote:
>
> Thanks for all the pointers. Here's a working solution with the right
> direction for inheritance:
>
> | b |
> b := RTMondrian new.
> b shape circle size: 20.
> b nodes: RTShape withAllSubclasses.
>
> b shape arrowedLine
>        head: RTEmptyNarrowArrow asHead; "See other RTLineDecorationShape"
>        withShorterDistanceAttachPoint;
>  color: (Color blue alpha:0.4).
>
> b edges connectTo: #superclass.
>
> b layout
> forceWithCharge: -500.
>
> b build.
> ^ b view
>
> <http://forum.world.st/file/n4915232/EmptyArrowLines.png>
>
>
>
> --
> View this message in context: http://forum.world.st/Changing-arrow-head-types-in-RTMondrian-tp4915133p4915232.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"It's not how it is, it is how we see it."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev