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

sun.print.DialogOwner does not support Dialogs as DialogOwner

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6u20
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b137
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP SP3

      A DESCRIPTION OF THE PROBLEM :
      The bugfix for BugID 6491273 introduced a new class: sun.print.DialogOwner to add the possibllity to set an owner for the PrintDialog via the PrintAttributeSet.
      The Class however only allows to set a Frame as owner of the PrintDialog it is also possible that the owner is a Dialog itself.

      The DialogOwner class is for example used in WPrinterJob class:

          private boolean displayNativeDialog()
          {
              if(attributes == null)
                  return false;
              DialogOwner dialogowner = (DialogOwner)attributes.get(sun/print/DialogOwner);
              Frame frame = dialogowner == null ? null : dialogowner.getOwner();

             //The line above shows it is never possible to instanciate the WPrintdialog with a Dialog.

              WPrintDialog wprintdialog = new WPrintDialog(frame, this);
              wprintdialog.setRetVal(false);
              wprintdialog.setVisible(true);
              boolean flag = wprintdialog.getRetVal();
              wprintdialog.dispose();
              Destination destination = (Destination)attributes.get(javax/print/attribute/standard/Destination);
      ...
      ...
      ...
      }




      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            psadhukhan Prasanta Sadhukhan
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: