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

sun.print.DialogOwner does not support Dialogs as DialogOwner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 6u20
    • client-libs
    • 2d
    • b137
    • x86
    • windows_xp

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: