Hi have a look at the code in LayoutPanel (mosaic) lines (446-450): http://code.google.com/p/gwt-mosaic/source/browse/branches/GWT-2.0/src/org/gwt/mosaic/ui/client/layout/LayoutPanel.java
I use a ResizableWidgetCollection from GWT Incubator, it works but I don't think its a very good idea. On Aug 6, 9:15 pm, Ray Ryan <[email protected]> wrote: > I can imagine, if I squint just right, wanting to set the size a few times > before kicking off the possibly expensive chain event of child calls. > Perhaps setSize() should default to announcing, and the overload with the > boolean is there to allow avoiding the side effect? > > On Thu, Aug 6, 2009 at 11:09 AM, Joel Webber <[email protected]> wrote: > > Yeah, I was just thinking the same thing, except that there's never a case > > where it shouldn't propagate (onLayout() is purely informative, for those > > widgets that occasionally need to do fixup work). I'll go stick that in now. > > > On Thu, Aug 6, 2009 at 2:06 PM, Ray Ryan <[email protected]> wrote: > > >> LayoutPanel#setSize(String width, String height, boolean propagate) > > >> On Thu, Aug 6, 2009 at 10:49 AM, Joel Webber <[email protected]> wrote: > > >>> On Thu, Aug 6, 2009 at 1:43 PM, John Tamplin <[email protected]> wrote: > > >>>> On Thu, Aug 6, 2009 at 1:41 PM, Joel Webber <[email protected]> wrote: > > >>>>> Please do have a look and see what might be done to make this easier. > >>>>> The names are definitely the most negotiable part of the design, and I'm > >>>>> definitely open to other ways of handling the "RootLayoutPanel" > >>>>> problem. The > >>>>> biggest issue I have with it at present is that there's no way to get() > >>>>> a > >>>>> RootLayoutPanel for an arbitrary element -- I think this is impossible > >>>>> in > >>>>> the general case, because there's no way to know when an arbitrary > >>>>> element's > >>>>> size has changed. The other design problem that I'm not terribly happy > >>>>> with > >>>>> is that there's no way to enforce that a widget that "RequiresLayout" be > >>>>> added to a panel that "ProvidesLayout". Again, I'm not sure that > >>>>> there's a > >>>>> perfect solution to this problem, but I'm quite open to ideas. > > >>>> I think you could have an "ExternallySizedLayoutPanel" that acts like a > >>>> RootLayoutPanel but it is up to the user to let it know when its size > >>>> changed. You could then inject it into an existing page, but you would > >>>> be > >>>> responsible for sizing it appropriately. > > >>>> This is assuming I understand the fundamental limitation you are worried > >>>> about. > > >>> That's precisely the issue. And you can get that now with by just > >>> instantiating a LayoutPanel, setting its size, and calling onLayout() > >>> directly. Perhaps there's something we could do to make this more obvious. --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
