< prev index next >
src/java.desktop/share/classes/sun/print/DialogOwner.java
Print this page
*** 23,35 ****
--- 23,37 ----
* 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,65 ****
*/
@SuppressWarnings("serial") // JDK-implementation class
public final class DialogOwner
implements PrintRequestAttribute {
! private Frame 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;
}
/**
* Returns the string table for class DialogOwner.
*/
! public Frame getOwner() {
return dlgOwner;
}
/**
--- 42,75 ----
*/
@SuppressWarnings("serial") // JDK-implementation class
public final class DialogOwner
implements PrintRequestAttribute {
! 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 Window getOwner() {
return dlgOwner;
}
/**
< prev index next >