|Full-width child figures in a ScalableRootEditPart. [message #237796]
||Thu, 09 August 2007 09:16
| Marian Schedenig
Registered: July 2009
In my GEF editor, I have a few figures which should always have the same
width as the editor area (the RootFigure instance). If the user resizes
the window, I want my figures to adapt to the current width. However, I
also have a number of figures with a fixed width, so there is a minimum
size my RootFigure should have - if the editor window is too small,
scrollbars should appear. From what I know, I have to use
ScalableRootEditPart to get the correct scrolling behaviour.
In the figure of the edit part corresponding to my root model, I have a
custom layout manager which should handle these things. So far I've
figured out that the manager could simply ask the root figure (the
Draw2D RootFigure instance mentioned above) for its width and use that.
My problem is that the layout gets, of course, only called when the
layer bounds change - and thanks to ScalableRootEditPart, the bounds
will stretch when the window size increases, but they will stay the same
if the window size is reduced. Therefore, my layout's getPreferredSize()
method is never called, and therefore, my "full width figures" never get
the chance to inform their parent that their width should be reduced as
Any hints how I could get the desired behaviour?
Powered by FUDForum
. Page generated in 0.03956 seconds