JavaTM 2 Platform
Standard Ed. 6

接口 javax.print.attribute.PrintRequestAttributeSet
的使用

使用 PrintRequestAttributeSet 的软件包
java.awt.print 为通用的打印 API 提供类和接口。 
javax.print 为 JavaTM Print Service API 提供了主要类和接口。 
javax.print.attribute 提供了描述 JavaTM Print Service 属性的类型以及如何分类这些属性的类和接口。 
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.text 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
 

java.awt.printPrintRequestAttributeSet 的使用
 

参数类型为 PrintRequestAttributeSetjava.awt.print 中的方法
 PageFormat PrinterJob.getPageFormat(PrintRequestAttributeSet attributes)
          使用与受此作业 PrintService 支持的那些值一致的值(即由 getPrintService() 返回的值),以及 attributes 中包含的介质、可打印区域和方向计算 PageFormat
 PageFormat PrinterJob.pageDialog(PrintRequestAttributeSet attributes)
          显示跨平台页面设置对话框的便捷方法。
 void PrinterJob.print(PrintRequestAttributeSet attributes)
          使用属性集中的设置打印一组页面。
 boolean PrinterJob.printDialog(PrintRequestAttributeSet attributes)
          为所有服务显示跨平台打印对话框的便捷方法,这些服务能够使用 Pageable 接口打印 2D 图形。
 

javax.printPrintRequestAttributeSet 的使用
 

参数类型为 PrintRequestAttributeSetjavax.print 中的方法
 void DocPrintJob.print(Doc doc, PrintRequestAttributeSet attributes)
          使用指定的作业属性打印文档。
 void MultiDocPrintJob.print(MultiDoc multiDoc, PrintRequestAttributeSet attributes)
          使用指定的作业属性打印 MultiDoc。
static PrintService ServiceUI.printDialog(GraphicsConfiguration gc, int x, int y, PrintService[] services, PrintService defaultService, DocFlavor flavor, PrintRequestAttributeSet attributes)
          为用户提供一个选择 PrintService(打印机)的对话框。
 

javax.print.attributePrintRequestAttributeSet 的使用
 

实现 PrintRequestAttributeSetjavax.print.attribute 中的类
 class HashPrintRequestAttributeSet
          类 HashPrintRequestAttributeSet 从类 HashAttributeSet 继承其实现,并强制执行接口 PrintRequestAttributeSet 的语义限制。
 

返回 PrintRequestAttributeSetjavax.print.attribute 中的方法
static PrintRequestAttributeSet AttributeSetUtilities.synchronizedView(PrintRequestAttributeSet attributeSet)
          创建一个给定打印请求属性集的同步视图。
static PrintRequestAttributeSet AttributeSetUtilities.unmodifiableView(PrintRequestAttributeSet attributeSet)
          创建一个给定打印请求属性集的不可修改的视图。
 

参数类型为 PrintRequestAttributeSetjavax.print.attribute 中的方法
static PrintRequestAttributeSet AttributeSetUtilities.synchronizedView(PrintRequestAttributeSet attributeSet)
          创建一个给定打印请求属性集的同步视图。
static PrintRequestAttributeSet AttributeSetUtilities.unmodifiableView(PrintRequestAttributeSet attributeSet)
          创建一个给定打印请求属性集的不可修改的视图。
 

参数类型为 PrintRequestAttributeSetjavax.print.attribute 中的构造方法
HashPrintRequestAttributeSet(PrintRequestAttributeSet attributes)
          构造一个最初使用给定集合中的值填充的新属性集,其中该属性集的成员限于 (PrintRequestAttributeSe 接口。
 

javax.swingPrintRequestAttributeSet 的使用
 

参数类型为 PrintRequestAttributeSetjavax.swing 中的方法
 boolean JTable.print(JTable.PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, boolean showPrintDialog, PrintRequestAttributeSet attr, boolean interactive)
          根据完全功能 print 方法的指定打印此表,将默认打印机指定为打印服务。
 boolean JTable.print(JTable.PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, boolean showPrintDialog, PrintRequestAttributeSet attr, boolean interactive, PrintService service)
          打印此 JTable
 

javax.swing.textPrintRequestAttributeSet 的使用
 

参数类型为 PrintRequestAttributeSetjavax.swing.text 中的方法
 boolean JTextComponent.print(MessageFormat headerFormat, MessageFormat footerFormat, boolean showPrintDialog, PrintService service, PrintRequestAttributeSet attributes, boolean interactive)
          打印此 JTextComponent 的内容。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only