|Re: Browser/Display resize [message #924118 is a reply to message #923508]
||Wed, 26 September 2012 14:24
| Cole Markham
Registered: July 2009
I think the shell/dialog idea sounds like a good solution. It would allow both moving and resizing (if you don't want resizing just set the style bits in the shell accordingly). You don't need a mouse-up listener, just add a ControlListener which will get changes to position and size of the shells. You would then have to snap to your grid and adjust your shells accordingly, being sure to distinguish these control events from user-generated ones. If you don't always want shell trim, you could have an "edit" mode which overlays the shells to allow modifications, then hides them and adjusts the actual widgets.
Also, you may want to check out the RAP port of Draw2D/GEF in the incubator. With GEF you can make a full-featured editor which can include snapping to a grid and/or other figures.
Finally, if you want to get resize events for the browser, you can use a full screen shell and add a ControlListener on it. In this case, beware the Text-Size Determination which will send spurious resize events. There used to be a FAQ entry for this, but it doesn't seem to be there anymore, perhaps it has changed for 2.0.
Powered by FUDForum
. Page generated in 0.03546 seconds