RFE: Let PrinterJob.printDialog dialog box be optionally modal

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 1.3.1_03
    • Affects Version/s: 1.2.2, 1.3.1
    • Component/s: client-libs
    • 03
    • x86
    • windows_nt



        Name: krT82822 Date: 09/19/99


        The dialog box shown by PrinterJob.printDialog is not modal and it should be. There is no option to make it modal even though most, if not all, applications will need it to be modal. Users with little knowledge may lose the dialog behind the browser window and not know how to get it back again.

        public class Applet extends javax.swing.JApplet
            implements java.awt.print.Printable
        {
            public void start()
            {
                java.awt.print.PrinterJob pjob =
                    java.awt.print.PrinterJob.getPrinterJob();
                pjob.setPrintable(this);
                if (pjob.printDialog()) // not modal, but needs to be
                {
                    try
                    {
                        pjob.print();
                    }
                    catch (java.awt.print.PrinterException e)
                    {
                    }
                }
            }
            
            public int print(java.awt.Graphics g,
                java.awt.print.PageFormat pf,int index)
            {
                if (index <= 0)
                {
                    return java.awt.print.Printable.PAGE_EXISTS;
                }
                return java.awt.print.Printable.NO_SUCH_PAGE;
            }
        }
        (Review ID: 93979)
        ======================================================================

        Failed in JDK1.4.1, JDK1.4.1_01 but it was fixed in merlin-beta so should be fixed in Hopper also.


        ###@###.### 2002-12-19

              Assignee:
              Oleg Sukhodolsky (Inactive)
              Reporter:
              Kevin Ryan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: