CompositeShape using RTMondrianViewBuilder

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

CompositeShape using RTMondrianViewBuilder

Leo Perard
Hi guys,

I just saw with Usman when we tried to add a CompositeShape using the RTMondrianViewBuilder it is not working.
Here the example :


| view elements |
view := RTMondrianViewBuilder new.
elements := (1 to: 10).
view nodes: elements.
view shape shape: (RTLine new color: Color red) + RTArrow new.
view edges: elements from: #yourself toAll: elements.
view horizontalLineLayout.
view

If you comment "+ RTArrow new" everything is ok but with the CompositeShape it is not.

Tanks.

--
Leo Perard

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

abergel
This is true that the composite shape does not work at all with the mondrian builder.

We will see how to fix this in the future…

Alexandre


On Apr 15, 2014, at 7:58 AM, Leo Perard <[hidden email]> wrote:

> Hi guys,
>
> I just saw with Usman when we tried to add a CompositeShape using the RTMondrianViewBuilder it is not working.
> Here the example :
>
>
> | view elements |
> view := RTMondrianViewBuilder new.
> elements := (1 to: 10).
> view nodes: elements.
> view shape shape: (RTLine new color: Color red) + RTArrow new.
> view edges: elements from: #yourself toAll: elements.
> view horizontalLineLayout.
> view
>
> If you comment "+ RTArrow new" everything is ok but with the CompositeShape it is not.
>
> Tanks.
>
> --
> Leo Perard
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

Leo Perard
It works with the nodes. Something like that is ok/

view := RTMondrianViewBuilder new.
view shape shape: (RTBox new color: Color green) + (RTLabel new text: 'Label').
view nodes: (1 to: 10).
view open

We can have the composite shape. So I don't know if it is the RTArrow or RTLine which fails.


On Wed, Apr 16, 2014 at 12:02 AM, Alexandre Bergel <[hidden email]> wrote:
This is true that the composite shape does not work at all with the mondrian builder.

We will see how to fix this in the future…

Alexandre


On Apr 15, 2014, at 7:58 AM, Leo Perard <[hidden email]> wrote:

> Hi guys,
>
> I just saw with Usman when we tried to add a CompositeShape using the RTMondrianViewBuilder it is not working.
> Here the example :
>
>
> | view elements |
> view := RTMondrianViewBuilder new.
> elements := (1 to: 10).
> view nodes: elements.
> view shape shape: (RTLine new color: Color red) + RTArrow new.
> view edges: elements from: #yourself toAll: elements.
> view horizontalLineLayout.
> view
>
> If you comment "+ RTArrow new" everything is ok but with the CompositeShape it is not.
>
> Tanks.
>
> --
> Leo Perard
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




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



--
Leo Perard

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

abergel
Apparently composite line shapes do not work 
It would be great if someone could have a look at it.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 15, 2014, at 7:34 PM, Leo Perard <[hidden email]> wrote:

It works with the nodes. Something like that is ok/

view := RTMondrianViewBuilder new.
view shape shape: (RTBox new color: Color green) + (RTLabel new text: 'Label').
view nodes: (1 to: 10).
view open

We can have the composite shape. So I don't know if it is the RTArrow or RTLine which fails.


On Wed, Apr 16, 2014 at 12:02 AM, Alexandre Bergel <[hidden email]> wrote:
This is true that the composite shape does not work at all with the mondrian builder.

We will see how to fix this in the future…

Alexandre


On Apr 15, 2014, at 7:58 AM, Leo Perard <[hidden email]> wrote:

> Hi guys,
>
> I just saw with Usman when we tried to add a CompositeShape using the RTMondrianViewBuilder it is not working.
> Here the example :
>
>
> | view elements |
> view := RTMondrianViewBuilder new.
> elements := (1 to: 10).
> view nodes: elements.
> view shape shape: (RTLine new color: Color red) + RTArrow new.
> view edges: elements from: #yourself toAll: elements.
> view horizontalLineLayout.
> view
>
> If you comment "+ RTArrow new" everything is ok but with the CompositeShape it is not.
>
> Tanks.
>
> --
> Leo Perard
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




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



--
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

Leo Perard
Hi I think I found why it is not working but I don't know how to fix it.

edges: objects from: fromBlock to: toBlock
| es |
self setLineShapeIfNecessary.
es := RTEdge
buildEdgesFromObjects: objects
from: fromBlock
to: toBlock
using: self nodeShape
inView: view
scope:
(RTGroup new
addAll: topLevelNodes;
yourself).
topLevelEdges addAll: es.
es do: #moveBehindItsExtremities.
^ es

this method call setLineShapeIfNecessary.

setLineShapeIfNecessary
(self nodeShape class inheritsFrom: RTAbstractLine)
ifFalse: [ self shape line ]

 It will replace the shape of the RTEdge because we have a CompositeShape.
Even if I put it in comment, there are still some bugs because of : es do: #moveBehindItsExtremities.
Same here I was able to run an example with a CompositeShape with RTArrow for my edges but not able to apply a TreeLayout.

So I don't know how to fix it. But I think RTCompositeShape do not work as it should.


On Wed, Apr 16, 2014 at 12:59 AM, Alexandre Bergel <[hidden email]> wrote:
Apparently composite line shapes do not work 
It would be great if someone could have a look at it.

Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 15, 2014, at 7:34 PM, Leo Perard <[hidden email]> wrote:

It works with the nodes. Something like that is ok/

view := RTMondrianViewBuilder new.
view shape shape: (RTBox new color: Color green) + (RTLabel new text: 'Label').
view nodes: (1 to: 10).
view open

We can have the composite shape. So I don't know if it is the RTArrow or RTLine which fails.


On Wed, Apr 16, 2014 at 12:02 AM, Alexandre Bergel <[hidden email]> wrote:
This is true that the composite shape does not work at all with the mondrian builder.

We will see how to fix this in the future…

Alexandre


On Apr 15, 2014, at 7:58 AM, Leo Perard <[hidden email]> wrote:

> Hi guys,
>
> I just saw with Usman when we tried to add a CompositeShape using the RTMondrianViewBuilder it is not working.
> Here the example :
>
>
> | view elements |
> view := RTMondrianViewBuilder new.
> elements := (1 to: 10).
> view nodes: elements.
> view shape shape: (RTLine new color: Color red) + RTArrow new.
> view edges: elements from: #yourself toAll: elements.
> view horizontalLineLayout.
> view
>
> If you comment "+ RTArrow new" everything is ok but with the CompositeShape it is not.
>
> Tanks.
>
> --
> Leo Perard
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




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



--
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


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




--
Leo Perard

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: CompositeShape using RTMondrianViewBuilder

pharo4Stef@free.fr
In reply to this post by Leo Perard
To me this code is a sign of a hidden conditional (in the vein of isKindOf:)

setLineShapeIfNecessary
(self nodeShape class inheritsFrom: RTAbstractLine)
ifFalse: [ self shape line ]
And I would use double dispatch instead.


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