diff options
author | Carolyn MacLeod <carolyn> | 2008-03-20 18:59:59 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2008-03-20 18:59:59 +0000 |
commit | 43d8c45f6600138a9de9cf1ed31e6b4474d120c0 (patch) | |
tree | 3bb898548dfa08253992dd7cbf3eb89bf43f40ee /bundles/org.eclipse.swt/Eclipse SWT Printing/photon | |
parent | 230505d4ad827a1c4e6bb987a098d96d90c30b1b (diff) | |
download | eclipse.platform.swt-43d8c45f6600138a9de9cf1ed31e6b4474d120c0.tar.gz eclipse.platform.swt-43d8c45f6600138a9de9cf1ed31e6b4474d120c0.tar.xz eclipse.platform.swt-43d8c45f6600138a9de9cf1ed31e6b4474d120c0.zip |
Add set/getPrinterData API to allow printer state to be saved across calls to open()
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Printing/photon')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java index 743ee70008..e58e1ae9d0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java @@ -12,6 +12,7 @@ package org.eclipse.swt.printing; import org.eclipse.swt.*; +import org.eclipse.swt.printing.PrinterData; import org.eclipse.swt.widgets.*; /** @@ -24,6 +25,7 @@ import org.eclipse.swt.widgets.*; * </p> */ public class PrintDialog extends Dialog { + PrinterData printerData; int scope = PrinterData.ALL_PAGES; int startPage = -1, endPage = -1; boolean printToFile = false; @@ -81,6 +83,28 @@ public PrintDialog (Shell parent, int style) { checkSubclass (); } /** + * Sets the printer data that will be used when the dialog + * is opened. + * + * @param data the data that will be used when the dialog is opened + * + * @since 3.4 + */ +public void setPrinterData(PrinterData data) { + this.printerData = data; +} +/** + * Returns the printer data that will be used when the dialog + * is opened. + * + * @return the data that will be used when the dialog is opened + * + * @since 3.4 + */ +public PrinterData getPrinterData() { + return printerData; +} +/** * Makes the receiver visible and brings it to the front * of the display. * |