You probably want to have at the end of the script mondrian:
... assocs := OrderedCollection new. assocs add: (view nodes at: 1) model ->(view nodes at: 33) model. assocs add: (view nodes at: 5) model ->(view nodes at: 45) model. assocs add: (view nodes at: 8) model ->(view nodes at: 36) model. view edgesFromAssociations: assocs. ...
Nice rendering:
Cheers, Alexandre
On May 17, 2013, at 4:52 AM, mathieubmddehouck@mailoo.org wrote:
Hi
There was a strike in Lille, and I admit it's not that easy to work home, it's far more easy to sleep in the sofa.
I have made a new shape anyway : ROArc, its an arc of a sixth of circle, maybe we can script it to choose the another shape (1/4, 1/2 ...).
Gofer new smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'Roassal-New'; load
You can try:
-=-=-=-=-=-=-=-=-=-=-=-
"Source code: ROExample>>expandableNodesOn:" "Preambule. It includes the initialization. " | view rawView layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "-------------" "-------------"
layout:= ROVerticalCompactTree new. view shape circle size: 15 . view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout userDefinedEdges: view edges. view layout: layout. layout verticalGap: 70; horizontalGap: 30. view applyLayout. view nodes do: [ :f | (layout childrenFor: f) do: [ :t | (t model inheritsFrom: f model) ifTrue: [ t model methodDict keysDo: [ :k | (f model methodDict includesKey: k) ifTrue: [ view edgeFromAssociation: f model ->t model ] ] ] ] ]. view edges do: [ :e | e - ROLine + (ROArc new color: (Color r: 0 g: 1 b: 0.5 ); width: 2) ]. layout userDefinedEdges do: [ :e | e - ROArc + ((ROLine new) color: (Color r: 1 g: 0 b: 0 ); width: 2 ) ]. view shape: (ROBezierCurve orthoVertical new color: (Color r: 0.9 g: 0.8 b: 0 ); width: 2 ) . view edgeFromAssociation: (view nodes at: 1) model ->(view nodes at: 33) model. view edgeFromAssociation: (view nodes at: 5) model ->(view nodes at: 45) model. view edgeFromAssociation: (view nodes at: 8) model ->(view nodes at: 36) model.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open.
-=-=-=-=-=-=-=-=-=-=-=-=-
And you'll see that when we set a new shape in the easel, only the next edge is affected.
In this example red edges represent inheritance, green arcs represent overriding on parent's methods, and the 3 other are just for test purpose.
And we noticed that only one of the three is drawn in yellow, the two other are in straight grey.
And I think, we got the same problem when defining multiple edges at the same time, only the first take the newly set shape.
Regards
Mathieu
<test shape.png>_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev