Umm... I still don't get it. Seems that the proper
way to group objects together is not by Composite shapes but with RTGroup and RTNest.
Hopefully with the time I will. Anyway I hope this question can help to improve
documentation.
Yes it does. From what I have seen, composite shapes are well adapted for naming elements.
Which is pretty close to what we originally planed. I
would like to play with some color saturation on the epicycle, which could imply, at some
point changing the color of the font of the numbers on it, changing from black to other
colors. I also presume that would be nice to have some kind of scale in the graph.
Distance between epycicle and nucleus avatar is measured in a logarithmic inspired scale,
first days (green), then weeks (orange), then months (red) and finally years (black).
Excellent!
So, two more questions:
- How can I select the zoom out level of the view, making all object to fit in that view
automatically (the screenshot was obtained by manually zooming out and arranging the
visual objects).
you simply have to send #focusOnCenterScaled to the Trachel canvas. Consider the following
example (the most important line is the menu):
-=-=-=-=-=-=-=-=-=-=-=-=
| b |
b := RTMondrian new.
b shape circle
size: 8;
if: [ :c | '*Line*' match: c name ] fillColor: Color red.
b nodes: TRShape withAllSubclasses, RTShape withAllSubclasses.
b shape line.
b edges
connectFrom: #superclass.
b shape bezierLineFollowing: #superclass; color: (Color blue alpha: 0.2).
b edges
objects: TRShape withAllSubclasses, RTShape withAllSubclasses;
notUseInLayout;
connectToAll: #dependentClasses.
b layout tree.
b build.
“VVVVV important line VVVVVV"
b view addMenu: 'focus' callback: [ b view canvas focusOnCenterScaled. b view
signalUpdate ].
^ b
-=-=-=-=-=-=-=-=-=-=-=-=
- How can I get this kind of "logarithmic"
scale a rule in the bottom of the view.
I do not understand. What such a scale is supposed to do?
- A sytle
question "labeledCircleSized: upLabel: downLabel: at:" seems descriptive to me,
but I don't know if has the proper style for a method name. I can read Smalltalk with
Style to look at it, now that I know more about the environment, but advice of seasoned
smalltalkers would help a lot in getting proper style also.
You may want to use a factory object to configure its creation :-)
I remember reading something about factory of objects in the book Squeak Learn
programming with Robots, but that was the name for a class... still I don't get it :-/
From Slide 16 until Slide 24 in:
https://www.dropbox.com/s/w7r17a5xlahj6oa/14-MoreDesignPatterns.pdf?dl=0
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.