Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Notify of a FreeformLayer resize
Notify of a FreeformLayer resize [message #208608] Tue, 07 February 2006 17:51
Eclipse UserFriend
Originally posted by: volkerlerch.arcor.de

Hello,

I'm trying to develop an editor wit gef.
For the painting area I using a FreeformLayer with a FreeformLayout
and a ScalableFreeformRootEditPart as RootEditPart.

Some special figures on the painting area should be always placed
rightmost and some rightleft, but all other figures, which will be add
to the area, could be placed somewhere.
If the user add a special figure on the painting area, I calculate
the drop position with "getLayoutContainer().getClientArea().getRight()
in the getCreateCommand() method. The positioning are OK, but if the
size of the canvas was changed, the figures did not located any more on
the rigthmost positions (of course not!).
I think I can't create a constraint for the figures which depends of the
size of the painting area, so I choose this way.

What I try to do is to align the figures on the rightmost every time the
size of the painting area was changed.
How can I determine if the size of the painting area has changed,
or which event was activated when this happens?
I didn't found nothing, so the last chance for me is to ask here.

I had trying implement the FreeformListener interface and to override
the method notifyFreeformExtentChanged() in the AbstractEditPart for my
diagram (and get the new size with getFreeformExtent()). I add the
listerner with addFreeformListener to the FreeformLayer.
But it recognize only changes from the figures which was placed on the
FreeformLayer, and not from the Freeform layer itself.

When is a request REQ_RESIZE invoke? It is possible to do it on this way
and override the performRequest Method or using the ResizableEditPolicy
in a way to the solve the problem?

Was I on the right way or is my approach completely wrong?


Thanks for Help.
Best Regards
Volker
Previous Topic:How to get another Toolbar Button in one Toolbar Button?
Next Topic:TreeFigure
Goto Forum:
  


Current Time: Tue Apr 23 13:38:54 GMT 2024

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

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

Back to the top