For example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| renderer node1 node2 edge |
renderer := MORenderer new.
node1 := renderer node on: 'hello'.
node2 := renderer node on: 'world'.
edge := renderer edge from: node1 to: node2.
renderer addNodes: {node1 . node2}.
renderer addEdge: edge.
renderer layout horizontalLine.
renderer element applyLayout.
renderer open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The result is:
Another example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
renderer := MORenderer new.
node1 := renderer node on: 'hello'.
triangleShape := renderer shape triangle.
triangleShape width: [ :v | v size * 10 ].
triangleShape height: [ :v | v size * 20 ].
node1 shape: triangleShape.
node2 := renderer node on: 'world'.
node2 shape: (circleShape := renderer shape ellipse).
edge := renderer edge from: node1 to: node2.
renderer layout horizontalLine.
renderer element applyLayout.
renderer addNodes: {node1 . node2}.
renderer addEdge: edge.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The result is:
Cheers,
Alexandre
On 20 Jun 2011, at 09:40, Stéphane Ducasse wrote:
On Jun 20, 2011, at 3:03 PM, Alexandre Bergel wrote:
The package MondrianNew in the squeaksource
repository of Mondrian contains a bunch of classes we quickly defined:
MORenderer>>
addEdge:
addEdges:
addNode:
addNodes:
MOEdgeFactory>>
from:to:
MONodeFactory>>
on:
How should use that?
Do you have examples?
Stef
Cheers,
Alexandre
On 19 Jun 2011, at 17:52, Tudor Girba wrote:
That would be interesting to look at.
Cheers,
Doru
On 19 Jun 2011, at 18:19, Lukas Renggli wrote:
For what it is worth: While I was in Chile last
year Alexandre, Johan
and I designed and (I think) partly implemented an alternative
Mondrian API. The idea was to avoid these multi-argument selectors
(like in the Seaside API) and have it much more composable and
uniform. Not sure what happened with that?
Lukas
On 19 June 2011 14:37, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>
> On 19 Jun 2011, at 14:33, jannik.laval wrote:
>
>>
>> On Jun 19, 2011, at 14:21 , Tudor Girba wrote:
>>
>>> Hi,
>>>
>>>> Thank you for the explanation.
>>>
>>> My pleasure :). But now, let's see if we can make it better. There are
two actions that seem to come out of the discussion:
>>> - do a pass over the comments to better reveal that the input collections are
always entities (both behind nodes and behind edges)
>>> - reorganize the protocols of ViewRenderer to reveal better the structure of
the API
>>>
>>> The other thing would be the debugging capabilities.
>>>
>>> Who would want to work on these? :)
>>
>> I will do :)
>> I will begin to work on Moose, on tuesday.
>> I want also to work on DSM.
>
> Great!
>
> Keep us posted. I will open another thread about DSM.
>
> Doru
>
>
>> Jannik
>>
>>>
>>> Cheers,
>>> Doru
>>>
>>> --
>>>
www.tudorgirba.com
>>>
>>> "Every successful trip needs a suitable vehicle."
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)iam.unibe.ch
>>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
>
www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Live like you mean it."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.