< prev index next >

src/java.desktop/share/classes/sun/print/DialogOwner.java

Print this page

        

@@ -23,13 +23,15 @@
  * questions.
  */
 
 package sun.print;
 
+import java.awt.Dialog;
 import javax.print.attribute.Attribute;
 import javax.print.attribute.PrintRequestAttribute;
 import java.awt.Frame;
+import java.awt.Window;
 
 /**
  * Class DialogOwner is a printing attribute class that identifies
  * the window that owns the print dialog.
  *

@@ -40,26 +42,34 @@
  */
 @SuppressWarnings("serial") // JDK-implementation class
 public final class DialogOwner
     implements PrintRequestAttribute {
 
-    private Frame dlgOwner;
+    private Window dlgOwner;
 
     /**
      * Construct a new dialog owner attribute with the given frame.
      *
      * @param  frame the frame that owns the print dialog
      */
     public DialogOwner(Frame frame) {
         dlgOwner = frame;
     }
 
+    /**
+     * Construct a new dialog owner attribute with the given dialog.
+     *
+     * @param  dialog the dialog that owns the print dialog
+     */
+    public DialogOwner(Dialog dialog) {
+        dlgOwner = dialog;
+    }
 
     /**
      * Returns the string table for class DialogOwner.
      */
-    public Frame getOwner() {
+    public Window getOwner() {
         return dlgOwner;
     }
 
 
     /**
< prev index next >