overriding getFigure to return nested Figure ? [message #220738] |
Fri, 04 August 2006 01:41 |
Eclipse User |
|
|
|
Originally posted by: amechler.gmail.com
Hi there!
My main content model is made of elements and containers of such elements.
I represented the main content by a FreeformLayeredPane and the containers
by FreeformLayers.
Using a ScrollPane for the containers instead and a FreeformLayer for
the main content, like in the logic example, doesnt work for other reasons.
Anyway, the editparts bound to the elements face both situations. If an
element is put inside a container, the editpart produces its original Figure.
But if the element is child of the main content it needs to put that Figure
in a FreeformLayer. This way the contents editpart only gets layers when its
adding child visuals.
But then ResisableEditPolicy refers to getFigure() to apply handles and
AbstractGraphicalEditPart calls getFigure() for registering visuals.
So these should see the original figure and not the layer that is possibly
wrapping it.
As long as the contentpart only sees layers - well I wonder if its safe
and consistent to override the getFigure() method of the elements
editparts to return just that Figure and never the layer ??
It's just that getFigure seems to be called so very often...
Thanks in advance!
alex
|
|
|
Powered by
FUDForum. Page generated in 0.02427 seconds