public class PrintJob
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PrintJob.DocumentType
List of known document types.
已知文档类型的列表。 |
Constructor and Description |
---|
PrintJob(PrintSettings printSettings, PrintJob.DocumentType documentType) |
Modifier and Type | Method and Description |
---|---|
void |
addPrintJobListener(PrintJobListener listener)
Adds print job listener to receive printing events.
添加打印作业侦听器以接收打印事件。 |
PrintJob.DocumentType |
getDocumentType()
Returns the type of the document to print.
返回要打印的文档类型。 |
java.util.List<PrintJobListener> |
getPrintJobListeners()
Returns a list of all print job listeners registered on this job.
返回在此作业上注册的所有打印作业侦听器的列表。 |
PrintSettings |
getPrintSettings()
Provides access to the current print job settings.
提供对当前打印作业设置的访问。 |
void |
removePrintJobListener(PrintJobListener listener)
Removes the specified print job listener so that it no longer receives printing events from this job instance.
删除指定的打印作业侦听器,以使其不再从该作业实例接收打印事件。 |
public PrintJob(PrintSettings printSettings, PrintJob.DocumentType documentType)
public PrintSettings getPrintSettings()
public void addPrintJobListener(PrintJobListener listener)
listener
is
null
, no exception is thrown and no action is performed.
listener
- the print job listener.
-打印作业监听器。
public void removePrintJobListener(PrintJobListener listener)
listener
- the print job listener.
-打印作业监听器。
public java.util.List<PrintJobListener> getPrintJobListeners()
PrintJobListener
s or an empty list if no listeners are currently registered.
该作业的所有内容;如果当前未注册任何侦听器,则返回空白列表。
public PrintJob.DocumentType getDocumentType()
PrintJob.DocumentType
of the printing document
打印文件的