George, 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.
Also, are your posts being moderated? If so, let me know and I'll make sure that gets fixed. Cheers, joel. On Thu, Aug 6, 2009 at 1:33 PM, ggeorg <[email protected]>wrote: > > Yes I know there is a big difference about the two layout systems but > we could > use the same interfaces and base classes. This is easy to do, I think, > since both > layout systems will use a layout cascade (RootLayoutPanel and Viewport > for > gwt-mosaic) and things like that. > > Later today I will try to use the latest from GWT trunk and work with > your code. > About the class names that are almost identical I am afraid that there > will be > a confusion in the imports. This is why I want to merge this your > code. > > Sorry for posting this many times, I am new to the contributors list > and I found later > out that the posts are moderated. > > George. > > On Aug 6, 8:17 pm, Joel Webber <[email protected]> wrote: > > George, > > The main difference between this layout system and that in gwt-mosaic (or > > ext, for that matter), is that it performs nearly zero work in Javascript > > (the one exception is that the layout widget hierarchy *does* have a > > provision for a post-layout fixup pass, but it's expected to do nothing > 99% > > of the time). It requires that the layout you wish to achieve be > expressible > > through the CSS properties left:, right:, top:, bottom:, width:, and > > height:. As I discuss in the design doc, this makes a huge difference in > > performance. To the extent that you can express mosaic layouts using the > > constraints available in the Layout class, it may be possible to merge > the > > two. > > > > As for DesignGridLayout, I'm not entirely sure that Layout would be the > > right way to achieve this, but I could be wrong. It's been a while since > I > > played with DesignGrid, and it would probably be better if we could find > a > > way to express it as an html <table>, though I haven't investigated > whether > > or not this is possible. > > > > Cheers, > > joel. > > > > On Thu, Aug 6, 2009 at 10:27 AM, ggeorg <[email protected] > >wrote: > > > > > > > > > Hi, > > > > > I work for gwt-mosaic and implemented an "Absolute Javascript Layout" > > > system based on AbsolutePanel and (like SWING) on various > > > LayoutManagers: > > > > >http://code.google.com/p/gwt-mosaic/source/browse/branches/GWT-1.6/sr. > .. > > > > >http://code.google.com/p/gwt-mosaic/source/browse/branches/GWT-1.6/sr. > .. > > > > > I use the package protected method Widget.setLayoutData() for the > > > various layout hints. > > > > > So far it works good, at least I could port JGoodies Forms: > > > > >http://69.20.122.77/gwt-mosaic/Showcase.html#CwQuickStartExample > > > > > Other LayoutManagers are: FillLayout, BoxLayout, BorderLayout and > > > GridLayout. > > > > > The layout cascade in gwt-mosaic is based on HasLayoutManager > > > interface, that a container (panel) has to implement: > > > > >http://code.google.com/p/gwt-mosaic/source/browse/branches/GWT-1.6/sr. > .. > > > > > Any widget can be added to a container that implements > > > HasLayoutManager there is no RequiresLayout interface. > > > > > I am interested in this topic because I want to adapt my code to the > > > new classes you provide and also I want to try if its possible to port > > >https://designgridlayout.dev.java.net/to GWT 2.0 new layout system. > > > > > Kind Regards, > > > George. > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
