gmfgraph -> Node -> Content Pane [message #645125] |
Wed, 15 December 2010 16:21 |
Eclipse User |
|
|
|
Originally posted by: marius.groeger.googlemail.com
Hello,
in a figure (rectangle) I have a simple GridLayout and two children, the
label and another rectangle. Now I want children of this element to live
inside that nested rectangle (I think this is what Alex Shatalin meant
in [1])
+---------------+
| Label |
| +-----------+ |
| | | |
| | Container | |
| | for | |
| | Children | |
| | | |
| +-----------+ |
+---------------+
I thought I could tell the generator this via the Node -> Content Pane
attribute. This accepts a child accessor, which I created for my nested
rectangle. However the diagram still wants to place children in the main
rectangle. If I add this to createNodeFigure() in my EditPart:
contentPane = setupContentPane(shape);
contentPane = ((MyFigure)contentPane).getFigureContainerArea();
then it actually works! (The nested rectangle uses an XY layout, and
when I move a child I get this strange 'phantom' feedback rectangles
that don't go away, but this is probably a different problem).
So what is the matter with Content Pane - is it supposed to work, and if
so, how?
I do not want to use Compartments, as I had different layout and design
problems with those in the past.
Thanks
Marius
[1] http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg12818.html
|
|
|