No to be negative, but I actually like the way I do it
now, which is
as follows:
- I visualize famix elements (namespaces, classes, methods, ...)
- each of these implements a method that is responsible for adding
its representation to the view
Yep, this is the way that we used in Moose
- each of these has a status (a famix property)
responsible for
keeping its visualisation state
But you're relying on properties in the model. Which could not always
be the case. For example, imagine I deal now with numbers, plain
instance of SmallInteger. Numbers cannot be annotated. Where would I
store the fact that a node is expanded or not?
Moreover, by using the properties of FAMIX objects to store the
"state" of the visualization (i.e., node that are expanded), your
model is somehow aware of the visualization. This is not what can be
called a clean separation of concerns :-)
I like this because
- I dont need to add vars to the classes
Right, but your model support properties.
- the visualisation state is permanent: if I do a full
refresh
nothing is lost
Good point! This is something I will have to take care of
- closing-opeing an element returns the element to its
previous
state although all the contained entities are redrawn
What I am proposing will have the same benefit
The only (minor) downside to this is that if I would
have 2
visualisations on the same data they will show the same expansion
state. I see no problem with this.
this is a no-surprise since you have one unique model for two
different visualization and your model is aware of your visualization.
Now the popupview is interesting as well. Are there
any other use
cases ?
Node expansion is one. Another is highlighting. For example. Try this:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view interaction highlightWhenOver: [:v | {v - 1 . v + 1. v + 4 . v -
4}].
view shape rectangle
width: 40;
height: 30;
withText.
view nodes: (1 to: 16).
view gridLayout gapSize: 2.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
When the mouse leaves a node, it set back the border to black! (set in
MOAnnouncer>>highlightWhenOver:). And if you want to highlight nodes
that have a non black border color, then the highlight will not behave
the way it should be.
The annotation mechanism should not have any impact on your existing
code by the way. More I think about it, more I am think this is the
way it should be.
Cheers,
Alexandre
On 14 Jan 2010, at 16:24, Alexandre Bergel wrote:
Hi!
Now that some of you are building complex and interactive
visualizations, I feel the need to add some annotations on things
that are displayed. I am not talking about the model here, but
really annotation on the view. For example, assume that I want the
size of a node to increase (e.g., to see its method inside) when I
double click on it. Where do I store the information that the node
has been expanded ?
I started to have this need with popupView:. A node needs to know
whether its popupview is on or not. I added a variable popup in
MOGraphElement which solve this. But more complex interaction
requires a generalization of this.
I am about to introduce a variable annotation in MOGraphElement
that will lazily create a dictionary.
Any comment?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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
--
Johan Fabry
jfabry(a)dcc.uchile.cl -
http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile
_______________________________________________
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.