JavaTM Platform
Standard Ed. 6

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

使用 AttributeSet 的软件包
javax.print 为 JavaTM Print Service API 提供了主要类和接口。 
javax.print.attribute 提供了描述 JavaTM Print Service 属性的类型以及如何分类这些属性的类和接口。 
 

javax.print 中 AttributeSet 的使用
 

返回 AttributeSet 的 javax.print 中的方法
 AttributeSet PrintService.getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes)
          标识在特定 DocFlavor 的上下文中打印请求不支持的属性。
 

参数类型为 AttributeSet 的 javax.print 中的方法
abstract  MultiDocPrintService[] PrintServiceLookup.getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes)
          应用程序不直接调用它。
abstract  PrintService[] PrintServiceLookup.getPrintServices(DocFlavor flavor, AttributeSet attributes)
          查找肯定可支持指定属性和 DocFlavor 组合的服务。
 Object PrintService.getSupportedAttributeValues(Class<? extends Attribute> category, DocFlavor flavor, AttributeSet attributes)
          确定客户端在设置此 PrintService 的作业时,是否可以指定给定类别中的打印属性值。
 AttributeSet PrintService.getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes)
          标识在特定 DocFlavor 的上下文中打印请求不支持的属性。
 boolean PrintService.isAttributeValueSupported(Attribute attrval, DocFlavor flavor, AttributeSet attributes)
          确定客户端在设置此 PrintService 的作业时,是否可以指定给定的打印属性值。
static MultiDocPrintService[] PrintServiceLookup.lookupMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes)
          查找能够打印 MultiDoc(包含所有指定的 doc flavor)的 MultiDoc PrintService。
static PrintService[] PrintServiceLookup.lookupPrintServices(DocFlavor flavor, AttributeSet attributes)
          查找能够打印指定 DocFlavor 的 PrintService。
 

javax.print.attribute 中 AttributeSet 的使用
 

javax.print.attribute 中 AttributeSet 的子接口
 interface DocAttributeSet
          接口 DocAttributeSet 指定文档属性(即:实现接口 DocAttribute 的打印属性)集的接口。
 interface PrintJobAttributeSet
          接口 PrintJobAttributeSet 为打印作业属性(即:实现接口 PrintJobAttribute 的打印属性)集指定接口。
 interface PrintRequestAttributeSet
          接口 PrintRequestAttributeSet 为打印请求属性(即:实现接口 PrintRequestAttribute 的打印属性)的集合指定接口。
 interface PrintServiceAttributeSet
          接口 PrintServiceAttributeSet 为打印作业属性(即:实现接口 PrintServiceAttribute 的打印属性)集指定接口。
 

实现 AttributeSet 的 javax.print.attribute 中的类
 class HashAttributeSet
          类 HashAttributeSet 提供具有哈希映射特征的 AttributeSet 实现。
 class HashDocAttributeSet
          类 HashDocAttributeSet 提供从类 HashAttributeSet 继承其实现的属性集,并强制执行接口 DocAttributeSet 的语义限制。
 class HashPrintJobAttributeSet
          类 HashPrintJobAttributeSet 提供从类 HashAttributeSet 继承其实现的属性集,并强制执行接口 PrintJobAttributeSet 的语义限制。
 class HashPrintRequestAttributeSet
          类 HashPrintRequestAttributeSet 从类 HashAttributeSet 继承其实现,并强制执行接口 PrintRequestAttributeSet 的语义限制。
 class HashPrintServiceAttributeSet
          类 HashPrintServiceAttributeSet 提供从类 HashAttributeSet 继承其实现的属性集,并强制执行接口 PrintServiceAttributeSet 的语义限制。
 

返回 AttributeSet 的 javax.print.attribute 中的方法
static AttributeSet AttributeSetUtilities.synchronizedView(AttributeSet attributeSet)
          创建给定属性集的同步视图。
static AttributeSet AttributeSetUtilities.unmodifiableView(AttributeSet attributeSet)
          创建给定属性集的不可修改的视图。
 

参数类型为 AttributeSet 的 javax.print.attribute 中的方法
 boolean AttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
 boolean DocAttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
 boolean HashAttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
 boolean PrintJobAttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
 boolean PrintRequestAttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
 boolean PrintServiceAttributeSet.addAll(AttributeSet attributes)
          将指定集合中的所有元素添加到此属性中。
static AttributeSet AttributeSetUtilities.synchronizedView(AttributeSet attributeSet)
          创建给定属性集的同步视图。
static AttributeSet AttributeSetUtilities.unmodifiableView(AttributeSet attributeSet)
          创建给定属性集的不可修改的视图。
 

参数类型为 AttributeSet 的 javax.print.attribute 中的构造方法
HashAttributeSet(AttributeSet attributes)
          构造一个最初使用给定集合中的值填充的新属性集。
HashAttributeSet(AttributeSet attributes, Class<?> interfaceName)
          构造一个最初使用给定集合中的值填充的新属性集,其中该属性集的成员限于给定的接口。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。