diff options
author | Carolyn MacLeod | 2008-03-20 18:59:59 +0000 |
---|---|---|
committer | Carolyn MacLeod | 2008-03-20 18:59:59 +0000 |
commit | 43d8c45f6600138a9de9cf1ed31e6b4474d120c0 (patch) | |
tree | 3bb898548dfa08253992dd7cbf3eb89bf43f40ee /bundles/org.eclipse.swt/Eclipse SWT Printing/carbon | |
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/carbon')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java index ca47c8648b..10347e5a00 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java @@ -11,6 +11,7 @@ package org.eclipse.swt.printing; import org.eclipse.swt.*; +import org.eclipse.swt.printing.PrinterData; import org.eclipse.swt.widgets.*; import org.eclipse.swt.internal.carbon.OS; @@ -24,6 +25,7 @@ import org.eclipse.swt.internal.carbon.OS; * </p> */ public class PrintDialog extends Dialog { + PrinterData printerData; int scope = PrinterData.ALL_PAGES; int startPage = 1, endPage = 1; boolean printToFile = false; @@ -83,6 +85,30 @@ public PrintDialog (Shell parent, int style) { } /** + * 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. * |