Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SIze of screen
SIze of screen [message #1808116] Mon, 17 June 2019 15:26 Go to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
Hi
Can I get info about size of window of browser before generate first composite?
Dmitry
Re: SIze of screen [message #1808119 is a reply to message #1808116] Mon, 17 June 2019 16:10 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Dmitry,

Display#getBounds is what you need.

Best regards,
Ivan
Re: SIze of screen [message #1808199 is a reply to message #1808119] Wed, 19 June 2019 07:15 Go to previous messageGo to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
Display.getCurrent().getBounds().x return zero
Where did I mistake?
Re: SIze of screen [message #1808212 is a reply to message #1808199] Wed, 19 June 2019 11:30 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

if you call this when the display is created (in the initial UI request) it will be zero as client (browser) didn't send it to the server yet. You also need a SWT.Resize listener attached to display.

HTH,
Ivan
Re: SIze of screen [message #1808308 is a reply to message #1808212] Fri, 21 June 2019 09:37 Go to previous message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
You should probably also look at the width property, not the x property.
x and y will always be zero, they're only relevant for multi-monitor scenarios on a desktop. RAP emulates a single monitor environment. Width and height is what you need.
Previous Topic:[ANN] RAP 3.9 released
Next Topic:RAP 3.7 and Java 11 Support
Goto Forum:
  


Current Time: Thu Mar 28 20:56:58 GMT 2024

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

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

Back to the top