migrating to Roassal - custom shapes
by Ben Coman
Referring to the attached graph, what is the best way to approach the
following in Roassal.
Currently with Mondrian I produce a produce a custom shape using the
forms builder in #mondrianShape, which is a method of my ModelRoot
class. Referring to the attached graph, as an example this shows the
class name "Substation" above the instance "SS1" and has a space for
contained items to be displayed within it.
>>mondrianShape
| builder |
builder := MOFormsBuilder new.
builder column; center; fill; pref; grow.
builder
row; center; pref; fill; grow;
row; center; pref; fill; grow;
row; center; pref; fill; grow.
builder x: 1 y: 1 add: ( MORectangleShape new text:
#strippedClassName; textAlignment: #left; borderColor: Color white ) .
builder x: 1 y: 2 add: ( MORectangleShape new text: #localName;
textAlignment: #left ) .
builder x: 1 y: 3 add: ( MORectangleShape new ) .
builder x: 1 y: 3 add: ( MOChildrenShape new ) .
^builder shape
In conjunction with the use of MOChildrenShape above, class ModelRoot
also has method #addSubViewTo: which descends through contained classes
- for example instance "primary" inside "T1" inside "SS2" inside "Figure
8..."
>>addSubViewTo: aMOViewRenderer
aMOViewRenderer
node: self
using: self mondrianShape
forIt:
[
self children do:
[ :child |
child addSubViewTo: aMOViewRenderer.
]
]
My initial issues in migrating this to Roassal are:
1. Roassal appears to not provide any methods that have "using:" in them.
2. Roassal appears to not support MOFormsBuilder
It may be that I am accessing to much internal methods. The code above
was the result of evolutionary hacking as I was learning Mondrian. I
would be happy to re-architect if someone can advise best practice for
Roassal.
cheers -ben
11 years, 3 months
migrating to roassal - MOArrowedOrthoVerticalLineShape
by Ben Coman
I am usings the code to produce the attached image.
view shape: (MOArrowedOrthoVerticalLineShape new).
view edges: inheritance from: #superclass to: #yourself.
How do I achieve that with Roassal?
And just to document something I got working... previously to hide lines
while keeping the layout I was using...
view shape: (MOStraightLineShape new color: Color white).
view edgesFrom: [ :xx | xx - 1 ].
and now...
(view edgesFrom: [ :xx | xx - 1 ] ) do: [ :edge | edge - ROEdge ] .
cheers -ben
11 years, 3 months
Quest for Hierarchical Data
by Mircea Filip Lungu
Hello Moosers,
As you already know, Dennis is working on the hierarchical graph data
structure and its great associated visualization in Pharo :) We have been
testing his code on software systems which have an inherently hierarchical
structure with low level relationships propagating up along the package
structure, but also thought we would try it on a different type of
hierarchical data. The two contributions (the HG data structure & the
visualization) are after all independent of the domain model.
Do you know of any data sources that have the following two properties?
1. There exists a set of relationships between low level, leaf entities
2. The low level, leaf entities can be aggregated along containment
relationships
One example would be trade relationships existent between companies, can be
aggregated to regions, countries, continents...
If you are aware of such a data set, we'd offer a beer for the information
:)
Cheers!
M.
11 years, 3 months
MooseChef: to what package do methods belong?
by Nicolas Anquetil
Another MooseChef decision:
aPackage queryOutgoingReferences
returns all the FamixReferences made from aPackage.
this is implemented by taking all methods (self methods) in the package
and asking them what reference they make.
And we have
FAMIXPackage>>methods
^ self localMethods union: self extensionMethods
So when asking a package what external references it makes, we get
references stemming from methods that extend classes of other packages.
We found this while computing a coupling metric for packages.
So the solution would be easy to implement, but we are not sure what is
the best solution ?
- we could change FAMIXPackage>>methods (methods belong to the package
that owns their class)
- we could change queryOutgoingReferences
(references/invocation/accesses stem from the methods in the classes in
the package, not from the methods in the package)
- or we could change our metric
nicolas
11 years, 3 months
Issue 820 in moose-technology: Roassal Mondrian builder does not initialize edges with a model
by moose-technology@googlecode.com
Status: New
Owner: tudor.gi...(a)gmail.com
CC: alexandr...(a)gmail.com
Labels: Type-Defect Priority-Medium Component-Roassal Milestone-4.7
New issue 820 by tudor.gi...(a)gmail.com: Roassal Mondrian builder does not
initialize edges with a model
http://code.google.com/p/moose-technology/issues/detail?id=820
The method used for initializing the edge is:
buildEdgeFrom: fromNode to: toNode
"Shape is not initialized here"
^ (ROEdge from: fromNode to: toNode) + shape
The problem here is that the edge does not receive a model object. Because
there is no model object, the transformations for properties like width or
color cannot be expressed properly.
11 years, 4 months
Roassal Easel examples interface
by Ben Coman
Just a few thoughts about how the Roassal Easel [Examples] are presented.
Some text describing the meaning of the blue and pink grouping boxes
would be useful - but to hazard a guess blue is the replicated Mondrian
functionality and pink is the new Roassal functionality ?
The ZoomIn and ZoomOut buttons don't work with either the [Examples] of
[Info] displayed - which is fair enough, but there is no feedback to
indicate the buttons will have no effect. This is quite nit-picking so
perhaps can be ignored.
Once any particular example is clicked, there is nothing that displays
what the current example is - so if (like me) you forget which it was
two seconds after you click it, you end up a bit lost. It would be nice
to have something that identifies the current example.
Example>interaction>leftAndRightClick - fails
Example>interaction>clickAndMove - the element ends up about 150 pixels
below the click. It should either centre or align a corner with the click.
Example>colors>normalizer - it is not clear what the purpose of this is,
especially under a colors section - it is just an empty black box that
is moved around.
11 years, 4 months