public interface DocPrintJob
Modifier and Type | Method and Description |
---|---|
void |
addPrintJobAttributeListener(PrintJobAttributeListener listener, PrintJobAttributeSet attributes)
为指定的属性更改的侦听器注册侦听器。
|
void |
addPrintJobListener(PrintJobListener listener)
在一个打印作业期间注册一个事件的侦听器。
|
PrintJobAttributeSet |
getAttributes()
获取此打印作业的打印属性集。
|
PrintService |
getPrintService()
决定
PrintService 对象的打印作业对象绑定。
|
void |
print(Doc doc, PrintRequestAttributeSet attributes)
用指定的作业属性打印文档。
|
void |
removePrintJobAttributeListener(PrintJobAttributeListener listener)
从这个打印作业中移除一个属性侦听器。
|
void |
removePrintJobListener(PrintJobListener listener)
从这个打印作业中移除一个侦听器。
|
PrintService getPrintService()
PrintService
对象的打印作业对象绑定。
PrintService
对象。
PrintJobAttributeSet getAttributes()
getAttributes()
方法调用的时间;即,返回的属性的对象的内容将不会被更新,如果将来改变打印作业的属性集的内容。检测属性值的变化,又称
getAttributes()
比较集前面的属性设置新的属性;另外,登记一个打印作业的事件监听器。返回的值可能是一个空集,但不应该是空的。
void addPrintJobListener(PrintJobListener listener)
listener
-实现监听器接口
removePrintJobListener(javax.print.event.PrintJobListener)
void removePrintJobListener(PrintJobListener listener)
listener
-实现监听器接口
addPrintJobListener(javax.print.event.PrintJobListener)
void addPrintJobAttributeListener(PrintJobAttributeListener listener, PrintJobAttributeSet attributes)
getAttributes()
和发现有趣和容易被报告给听众的子集。客户期望在一个特定的工作属性的变化进行更新,应验证它是在该集,但只有当它发生变化,这是由工作检测到的属性的更新。也可能会受到作业批量的更新。为了尽量减少在打印作业处理的开销,建议只听的属性的子集,这是可能改变。如果指定的设置为空,则将向侦听器报告任何属性更新。如果属性集是无效的,那么这就意味着要侦听作业支持的所有动态属性。如果一个作业不能报告任何属性更新,这可能会导致没有更新通知。如果侦听器已经注册,它将再次注册。
listener
-实现监听器接口
attributes
-听的属性,或零意味着所有的属性可以改变,由工作决定。
removePrintJobAttributeListener(javax.print.event.PrintJobAttributeListener)
void removePrintJobAttributeListener(PrintJobAttributeListener listener)
void print(Doc doc, PrintRequestAttributeSet attributes) throws PrintException
打印服务实现者应该关闭任何打印数据流(即读者或InputStream实现),他们从客户端文件获取。稳健的客户可能仍然希望验证这一。一个例外是如果一个DocFlavor
不能印产生。
doc
-要打印的文档。如果必须通过这味道PRINTJOB支持。
attributes
-工作属性适用于该打印作业。如果此参数为空,则使用默认属性。
PrintException
除外--还可以实现一个接口,更准确地描述了异常
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.