Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser/Display resize
Browser/Display resize [message #919442] Sat, 22 September 2012 01:46 Go to next message
Paul Watson is currently offline Paul WatsonFriend
Messages: 12
Registered: July 2009
Junior Member
Is it possible to listen for browser/display resize events in RAP? I tried adding a Resize listener to the display, but this does not seem to be a supported event.

Many thanks,
Paul
Re: Browser/Display resize [message #919803 is a reply to message #919442] Sat, 22 September 2012 11:01 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Paul,

currently, resize events aren't sent by the display. Regardless of SWT,
I would regard them as useful to have in RWT. The client already sends
the browser window size to the server. Thus we'd 'just' have to process
this information further.

Would you mind to open an enhancement request?

In the meanwhile, you might be able work around the issue with a resize
listener on a maximized Shell.

BTW what do you need the display size for?

Regards,
Rüdiger

On 22.09.2012 03:46, Paul Watson wrote:
> Is it possible to listen for browser/display resize events in RAP? I
> tried adding a Resize listener to the display, but this does not seem to
> be a supported event.
>
> Many thanks,
> Paul
>
--
Rüdiger Herrmann
http://codeaffine.com
Re: Browser/Display resize [message #923508 is a reply to message #919803] Wed, 26 September 2012 00:51 Go to previous messageGo to next message
Paul Watson is currently offline Paul WatsonFriend
Messages: 12
Registered: July 2009
Junior Member
Hi Rüdiger,

I am trying to put together an application in which user are able to create a set of dashboard widgets (be it tables, charts, images etc.) and save the layout of those widgets.

My preferred way of doing this would be via dragging and dropping views on the workbench and saving the perspectives somehow. As I understand it that is not currently possible as dragging views is not enabled in RAP. Also, it looks like programmatically saving and loading perspectives is problematic.

So, I thought a solution might be that each of the dashboard widgets were shells or non-modal dialogs and they get stuck to a snap-to style grid. I figured mouse up events are probably supported after dragging the shells, so I could detect position then and layout accordingly.

Perhaps some of the client side scripting stuff would help? Though from what I have read it looks like mouseMove is only supported on the canvas widget.

The maximize shell might be a nice workaround.

Cheers,
Paul

P.S. I submitted the enhancement request.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=390399
Re: Browser/Display resize [message #924118 is a reply to message #923508] Wed, 26 September 2012 14:24 Go to previous messageGo to next message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

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
Re: Browser/Display resize [message #925482 is a reply to message #924118] Thu, 27 September 2012 19:15 Go to previous messageGo to next message
Paul Watson is currently offline Paul WatsonFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks for all the advice. I have got something that is pretty much functional...
Re: Browser/Display resize [message #955197 is a reply to message #919442] Tue, 23 October 2012 15:47 Go to previous messageGo to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member
Not sure if my issue is related, but I am seeing some resize problem with my RAP application. Say if I started the application with a browser that is half the size of my screen, I am expecting the RAP application will resize automatically when I maximize the screen. This works fine under IE in Windows, but I see problems with Firefox in windows and Linux. Is there anything I need to do specifically in my code? I am a bit puzzled because IE9 works fine while others are not. Usually it is IE that causes issues.

Thanks in advanced for any pointers to this issue!

Ronald
Re: Browser/Display resize [message #962653 is a reply to message #955197] Mon, 29 October 2012 08:13 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Ronald,

if it works in one browser and doesn't work in others, chances are that
this is a bug. Could you file a bug together with a small code snippet?
Please also specify the RAP version you use.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Browser Widget focus problem
Next Topic:About PaintListener on Composite
Goto Forum:
  


Current Time: Fri Mar 29 05:36:48 GMT 2024

Powered by FUDForum. Page generated in 0.03412 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top