|
|
|
Re: Browser/Display resize [message #924118 is a reply to message #923508] |
Wed, 26 September 2012 14:24 |
|
Paul,
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[2]. 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[1] and add a ControlListener on it. In this case, beware the Text-Size Determination[2] 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.
[1] http://wiki.eclipse.org/RAP/FAQ#How_to_create_a_fullscreen_application
[2] http://eclipse.org/rap/incubator/
[3] http://wiki.eclipse.org/WidgetToolkit#Layouts_and_Text_Size_Determination
Good luck!
Cole
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03456 seconds