Dear list,
Mondrian is a great tool :-) I have a question, how can I add a label under a box. I tried the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view nodes: mooseModel allClasses forEach: [:each | view newShape label text: #name. view verticalLineLayout. ]. view edgesFrom: #superclass. view treeLayout. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
But I still have unlabeled boxes...
Cheers, Alexandre
Hi,
You should use "view newShape" before the "view nodes:" or "view edges:". nodes:forEach: is used for specifying the graphs inside the node.
Try something like this:
view newShape label text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
Cheers, Doru
On Mar 18, 2008, at 8:38 PM, Alexandre Bergel wrote:
Dear list,
Mondrian is a great tool :-) I have a question, how can I add a label under a box. I tried the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view nodes: mooseModel allClasses forEach: [:each | view newShape label text: #name. view verticalLineLayout. ]. view edgesFrom: #superclass. view treeLayout. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
But I still have unlabeled boxes...
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Some battles are better lost than fought."
Excellent! And if I want to have the name below a box ?
Typically, I would like to have http://moose.unibe.ch/tools/mondrian/easel? _s=JksTBcIBfSanPmPz&_k=qJyPhpHC&_n&44 with the name of the entity below. I find that using the mouse to know a name of a class a bit cumbersome.
how can I attach a label to a class box :-)
Alexandre
On 18 Mar 2008, at 15:42, Tudor Girba wrote:
Hi,
You should use "view newShape" before the "view nodes:" or "view edges:". nodes:forEach: is used for specifying the graphs inside the node.
Try something like this:
view newShape label text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
Cheers, Doru
On Mar 18, 2008, at 8:38 PM, Alexandre Bergel wrote:
Dear list,
Mondrian is a great tool :-) I have a question, how can I add a label under a box. I tried the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view nodes: mooseModel allClasses forEach: [:each | view newShape label text: #name. view verticalLineLayout. ]. view edgesFrom: #superclass. view treeLayout. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
But I still have unlabeled boxes...
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Some battles are better lost than fought."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
There are two ways in which you can compose shapes:
1. decoration provides a very simple composition. In your case it would be:
view newShape rectangle; withBorder; withLabel; text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
2. using the FormsBuilder. This more complex, but it is very flexible. In your case, it would be: | builder | builder := Mondrian.FormsBuilder new. builder row; fill; pref; grow; row; size: 3; row; fill; pref; grow. builder column; fill; pref; grow. builder x: 1 y: 1 add: (Mondrian.RectangleShape withBorder). builder x: 1 y: 3 add: (Mondrian.LabelShape new label: #name). view shape: builder shape. view nodes: classGroup.
You can see examples in ViewRendeder>>umlClassShapeWithLabel: or in ViewRenderer>>umlPackageShapeWithLabel:
Cheers, Doru
On Mar 18, 2008, at 8:56 PM, Alexandre Bergel wrote:
Excellent! And if I want to have the name below a box ?
Typically, I would like to have http://moose.unibe.ch/tools/mondrian/easel? _s=JksTBcIBfSanPmPz&_k=qJyPhpHC&_n&44 with the name of the entity below. I find that using the mouse to know a name of a class a bit cumbersome.
how can I attach a label to a class box :-)
Alexandre
On 18 Mar 2008, at 15:42, Tudor Girba wrote:
Hi,
You should use "view newShape" before the "view nodes:" or "view edges:". nodes:forEach: is used for specifying the graphs inside the node.
Try something like this:
view newShape label text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
Cheers, Doru
On Mar 18, 2008, at 8:38 PM, Alexandre Bergel wrote:
Dear list,
Mondrian is a great tool :-) I have a question, how can I add a label under a box. I tried the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view nodes: mooseModel allClasses forEach: [:each | view newShape label text: #name. view verticalLineLayout. ]. view edgesFrom: #superclass. view treeLayout. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
But I still have unlabeled boxes...
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Some battles are better lost than fought."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Problem solving efficiency grows with the abstractness level of problem understanding."
Sorry for the delay... Thanks for your answer.
It works like a charm!
Alexandre
- decoration provides a very simple composition. In your case it
would be:
view newShape rectangle; withBorder; withLabel; text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
- using the FormsBuilder. This more complex, but it is very flexible.
In your case, it would be: | builder | builder := Mondrian.FormsBuilder new. builder row; fill; pref; grow; row; size: 3; row; fill; pref; grow. builder column; fill; pref; grow. builder x: 1 y: 1 add: (Mondrian.RectangleShape withBorder). builder x: 1 y: 3 add: (Mondrian.LabelShape new label: #name). view shape: builder shape. view nodes: classGroup.
You can see examples in ViewRendeder>>umlClassShapeWithLabel: or in ViewRenderer>>umlPackageShapeWithLabel:
Cheers, Doru
On Mar 18, 2008, at 8:56 PM, Alexandre Bergel wrote:
Excellent! And if I want to have the name below a box ?
Typically, I would like to have http://moose.unibe.ch/tools/mondrian/easel? _s=JksTBcIBfSanPmPz&_k=qJyPhpHC&_n&44 with the name of the entity below. I find that using the mouse to know a name of a class a bit cumbersome.
how can I attach a label to a class box :-)
Alexandre
On 18 Mar 2008, at 15:42, Tudor Girba wrote:
Hi,
You should use "view newShape" before the "view nodes:" or "view edges:". nodes:forEach: is used for specifying the graphs inside the node.
Try something like this:
view newShape label text: #name. view nodes: mooseModel allClasses. view edgesFrom: #superclass. view treeLayout.
Cheers, Doru
On Mar 18, 2008, at 8:38 PM, Alexandre Bergel wrote:
Dear list,
Mondrian is a great tool :-) I have a question, how can I add a label under a box. I tried the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view nodes: mooseModel allClasses forEach: [:each | view newShape label text: #name. view verticalLineLayout. ]. view edgesFrom: #superclass. view treeLayout. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
But I still have unlabeled boxes...
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Some battles are better lost than fought."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com www.tudorgirba.com/blog
"Problem solving efficiency grows with the abstractness level of problem understanding."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev