Hi!
One strong principle in Mondrian is to have graph elements independent of their
representation. A graph element being just a wrapper of the domain object. This is what
has been enforced in the VW and Pharo versions.
However, this has not been completely nice and clean. For example, MOGraphElement defines
#bounds, #absoluteBounds. MONode defines #translatedBy:. Shall these methods be moved into
the shape?
Currently, we have the following responsibilities:
a graph element:
- keeping a ref to its shape
- managing caches
- managing attributes
- managing nesting of nodes and edges
- layout
- supporting announcement
a node:
- keeping a location
- maintaining a zordered-list of elements to display
- dedicated caches (e.g., bitmap)
- rendering on a canvas
an edge:
- target and source node
- rendering on a canvas
a root:
- selection box
- another event management
Clearly, some responsibilities are ill located. I will do soon some cleaning...
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.