[ http://opensource.atlassian.com/projects/spring/browse/RCP-101?page=
=3Dcom.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter De Bruycker resolved RCP-101.
-----------------------------------
Resolution: Fixed
created a WindowUtils.centerOnScreen method
changed all window showing code so it calls WindowUtils.centerOnScreen meth=
od
> Window centering issues in Spring-rich with multiple monitors
> -------------------------------------------------------------
>
> Key: RCP-101
> URL: http://opensource.atlassian.com/projects/spring/brow=
se/RCP-101
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Environment: Linux (Mandrake 10.1) with multiple monitors (multi-=
headed)
> JDK 1.5
> Reporter: Andy DePue
> Assignee: Peter De Bruycker
>
> There are various places in Spring-rich code where windows are centered o=
n the screen (as opposed to centered on top of another window), but the cod=
e to perform the centering does not behave well on all operating systems wh=
en run on multi-headed displays. For a complete description and solution o=
f the problem, see this issue: http://opensource.atlassian.com/projects/spr=
ing/browse/RCP-54
> While the patch provided in RCP-54 addresses that one instance of the pro=
blem, I have since run into other instances in Spring-rich. Namely in thes=
e classes: org.springframework.richclient.application.SplashScreen and org.=
springframework.richclient.util.WindowUtils. While these two classes do no=
t use the exact same faulty centering mechanism as was described in RCP-54 =
(that is, setLocationRelativeTo(null)), they employ the same algorithm for =
centering as the currently buggy Window.setLocationRelativeTo(null). The r=
eal source of the problem is getToolkit().getScreenSize(), which does not a=
lways honor the contract defined in getScreenSize's JavaDoc, meaning that o=
n some operating systems getScreenSize() will return the size across all di=
splays, not just the primary display (causing windows to become split betwe=
en screens if used for centering). I propose that a single utility method =
be made for centering windows on screen. It would seem that WindowUtils pr=
ovides methods for this very purpose, so if we still like the idea of Windo=
wUtils (and its static methods), then maybe WindowUtils should be modified =
to use the same centering technique provided in RCP-54 and all spring-rich =
code can then invoke WindowUtils (to remove code duplication). Another adv=
antage of the solution for RCP-54 is that it takes into account taskbars an=
d other docked windows on the user's desktop.
--=20
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: htt=
p://opensource.atlassian.com/projects/spring/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|