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

Define API to support specifying ownership of print dialogs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b18

      Backports

        Description

        The Page Setup and Print Dialogs used by Java 2D printing,
        i.e. java.awt.print.PrinterJob, are created by the printing
        implementation. Thus the application cannot specify an owner
        window. The implementation tries to find a suitable window to
        act as the owner, so that the dialog can be kept on top of that
        window rather than hidden. But if the application could specify this directly it may make for a better experience.
        And what if the window is not an AWT window, but say, a JavaFX window ? A way to specify a non-AWT owner might be useful.
        Also the application might prefer that it be on top of all windows,
        ie. using the java.awt.Window.setAlwaysOnTop(true) functionality.
        This might be needed for the case where the non-AWT window owner support is not possible.

        With such API we can remove JavaFX's dependency on JDK internal access to this dialog ownership behaviour as tracked by
        https://bugs.openjdk.java.net/browse/JDK-8195808

        One way to do this is to add a new DialogOwner printing attribute.
        The application can include this in the attribute set parameter to the dialog methods.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                prr Philip Race
                Reporter:
                prr Philip Race
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: