Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6212751

DOC: ServiceUI.printDialog() need to enhance the description for X,Y coordinates

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b124
    • CPU:
      generic
    • OS:
      generic

      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

        Attachments

          Activity

            People

            Assignee:
            psadhukhan Prasanta Sadhukhan
            Reporter:
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: