JDK-6212751 : DOC: ServiceUI.printDialog() need to enhance the description for X,Y coordinates
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-12-27
  • Updated: 2017-05-16
  • Resolved: 2016-06-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b124Fixed
Description
API doc for ServiceUI.printDialog() specifies that X,Y are location of the dialog in screen coordinates. On a multi-monitor virtual screen configuration, when I pass a coordinate that belongs to the virtual coordinate space, the dialog is not shown in the specified location. The reason is as follows:

1. The implementation of this method adds X value with GC.getBounds().X and adds Y value with GC.getBounds().Y which is unexpected. When it claims to accept screen coordinates, the user would assume that the dialog would appear in the location given which is not the case now for a V.Screen. If the sec monitor starts at 1025, 0 and If I specify 1025 as the X coordinate, the calculated X value would be 1025 + 1025 = 2050 which actually exceeds the bounds of virtual screen. Hence if this implementation is right, the doc must be clarified saying the coordinates are with respect to a particular screen (the given GC) and should'nt be a coordinate of a virtual space.

2. The usage of GC passed to this method is not clear, though it looks like it is meant for selecting the screen. On a Virtual Screen, the user can place the dialog anywhere by specifying the coordinates of virtual space and does not need to specify a GC. On a multi-screen with independent monitors, GC can be obtained from the active window and location specified can be interpreted with respect to that GC. 

This has been there since 1.4 and applicable to all platforms (xinerama, win32).


###@###.### 2004-12-27 15:47:39 GMT