Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2008-03-20 18:59:59 +0000
committerCarolyn MacLeod2008-03-20 18:59:59 +0000
commit43d8c45f6600138a9de9cf1ed31e6b4474d120c0 (patch)
tree3bb898548dfa08253992dd7cbf3eb89bf43f40ee /bundles/org.eclipse.swt/Eclipse SWT Printing/emulated
parent230505d4ad827a1c4e6bb987a098d96d90c30b1b (diff)
downloadeclipse.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/emulated')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java
index 8e4e73d653..6421544e6a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/emulated/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;
@@ -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;
+}
+
+/**
* Returns the print job scope that the user selected
* before pressing OK in the dialog. This will be one
* of the following values:

Back to the top