|
Re: Display Child outside ParentContainer [message #1746359 is a reply to message #1746343] |
Thu, 27 October 2016 09:14   |
Eclipse User |
|
|
|
Hi korbinian,
GEF 3.x Draw2D restricts the drawing area for children to the bounding box of their parent, i.e. children figures can only draw within the bounds of their parent figure.
As far as I know, you cannot change this behavior. As a workaround, you could increase the bounds of the parent figure, so that the children figures are not clipped at the bounds. I do not know the details for this, but I know that it is a common problem with GEF 3.x Draw2D, so maybe you can find examples online. Another workaround would be to remove the parent-child-relation within the edit-part hierarchy, i.e. let ports and systems have parts on the same level of the hierarchy (if feasible).
However, with the new version of GEF (Neon: GEF4 1.1.0, Oxygen: GEF 5.0.0), where the visualization is based on JavaFX, this restriction was naturally lifted as JavaFX generally allows children to draw outside their parent. So depending on the features that are needed, maybe it is worth to take a look at the current version of GEF.
Best regards,
Matthias
|
|
|
|
|
|
Re: Display Child outside ParentContainer [message #1747580 is a reply to message #1747577] |
Wed, 16 November 2016 03:45  |
Eclipse User |
|
|
|
Within GEF4 there is no limitation that children are rendered outside their parents. Things would be easy there.
In GEF 3.x we have such a restriction (within Draw2d). You could work around it on the figure side by overwriting IFigure#getChildren() and remove the clipping there, but you really need to know what you are doing, as updating of dirty regions and repainting then has to be handled in your code as well. I pointed to GMF runtime because they have added respective concepts in their MVC abstractions already. That is probably the better place to start.
|
|
|
Powered by
FUDForum. Page generated in 0.03088 seconds