Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » overriding getFigure to return nested Figure ?
overriding getFigure to return nested Figure ? [message #220738] Fri, 04 August 2006 01:41
Eclipse UserFriend
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
Previous Topic:Connection problems - getConnectionCompleteCommand() called when created source
Next Topic:Getting References to other Models
Goto Forum:
  


Current Time: Thu Jan 23 10:59:07 GMT 2025

Powered by FUDForum. Page generated in 0.02427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top