Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 280759 Details for
Bug 553355
[Wayland] Can't get proper display relative coordinates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
TestCoordinates.java
TestCoordinates.java (text/x-java), 1.16 KB, created by
Martin Coufal
on 2019-11-22 06:49:42 EST
(
hide
)
Description:
TestCoordinates.java
Filename:
MIME Type:
Creator:
Martin Coufal
Created:
2019-11-22 06:49:42 EST
Size:
1.16 KB
patch
obsolete
>import java.awt.AWTException; > >import org.eclipse.swt.graphics.Point; >import org.eclipse.swtbot.swt.finder.SWTBot; >import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; >import org.junit.Test; >import org.junit.runner.RunWith; > >import com.redhat.toolsqe.eclipse.tests.baseinst.libs.util.Sleep; > >@RunWith(org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.class) >public class TestCoordinates { > private static SWTBotShell prefShell = null; > private static Point SHELL_LOC = null; > private static Point p = null; > > @Test > public void test() throws AWTException { > > Sleep.sleep(5); > SWTBot bot = new SWTBot(); > bot.menu("Window", false).menu("Preferences").click(); > prefShell = bot.shell("Preferences"); > prefShell.activate(); > > // find Preferences coordinates (display relative) > bot.getDisplay().syncExec(new Runnable() { > public void run() { > p = prefShell.widget.getLocation(); > SHELL_LOC = prefShell.widget.getParent().toDisplay(p); > } > }); > System.out.println(String.format("Parent relative coordinates: [%d,%d]", p.x, p.y)); > System.out.println(String.format("Display relative coordinates: [%d,%d]", SHELL_LOC.x, SHELL_LOC.y)); > Sleep.sleep(5); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 553355
: 280759 |
280760
|
280761