JavaTM 2 Platform
Standard Ed. 6

介面 javax.print.attribute.Attribute
的使用

使用 Attribute 的軟體套件
javax.print 為 JavaTM Print Service API 提供了主要類別和介面。 
javax.print.attribute 提供了描述 JavaTM Print Service 屬性的型別以及如何分類別這些屬性的類別和介面。 
javax.print.attribute.standard 包 javax.print.attribute.standard 套件括特定列印屬性的類別。 
 

javax.print 中 Attribute 的使用
 

返回 Attribute 的 javax.print 中的方法
 Attribute[] AttributeException.getUnsupportedValues()
          返回其 PrintService 實例支持該屬性,但是不支持該屬性特定值的列印屬性陣列,如果沒有這種屬性值,則返回 null。
 

參數型別為 Attribute 的 javax.print 中的方法
 boolean PrintService.isAttributeValueSupported(Attribute attrval, DocFlavor flavor, AttributeSet attributes)
          確定客戶端在設置此 PrintService 的作業時,是否可以指定給定的列印屬性值。
 

型別變數型別為 Attribute 的 javax.print 中的方法參數
 Object PrintService.getDefaultAttributeValue(Class<? extends Attribute> category)
          確定給定類別別中此 PrintService 的預設列印屬性值。
 Object PrintService.getSupportedAttributeValues(Class<? extends Attribute> category, DocFlavor flavor, AttributeSet attributes)
          確定客戶端在設置此 PrintService 的作業時,是否可以指定給定類別別中的列印屬性值。
 boolean PrintService.isAttributeCategorySupported(Class<? extends Attribute> category)
          確定客戶端在設置此 PrintService 的作業時,是否可以指定給定列印屬性類別別。
 

javax.print.attribute 中 Attribute 的使用
 

javax.print.attribute 中 Attribute 的子介面
 interface DocAttribute
          介面 DocAttribute 是列印屬性類別實作的一個標記介面,用於指示屬性表示文檔 (doc) 的設置(“Doc”是一個簡短的、容易發音的術語,指“列印資料的片段”。
 interface PrintJobAttribute
          PrintJobAttribute 是列印屬性類別實作的標記介面,以指示該屬性描述“列印作業”的狀態或“列印作業”的一些其他特徵。
 interface PrintRequestAttribute
          介面 PrintRequestAttribute 是列印屬性類別實作的標記介面,以指示屬性表示用於列印作業的請求設置。
 interface PrintServiceAttribute
          介面 PrintServiceAttribute 是列印屬性類別實作的標記介面,以指示該屬性描述“列印服務”的狀態或“列印服務”的一些其他特徵。
 interface SupportedValuesAttribute
          介面 SupportedValuesAttribute 是列印屬性類別實作的標記介面,以指示該屬性描述用於其他屬性的支持值。
 

返回 Attribute 的 javax.print.attribute 中的方法
 Attribute AttributeSet.get(Class<?> category)
          返回此屬性集在給定的屬性類別別中包含的屬性值。
 Attribute HashAttributeSet.get(Class<?> category)
          返回此屬性集在給定的屬性類別別中包含的屬性值。
 Attribute[] AttributeSet.toArray()
          返回此集合中包含的屬性的陣列。
 Attribute[] HashAttributeSet.toArray()
           
static Attribute AttributeSetUtilities.verifyAttributeValue(Object object, Class<?> interfaceName)
          驗證給定的物件是否為給定介面(假定為介面 Attribute 或其子介面)的一個實例。
 

返回變數型別為 Attribute 的型別的 javax.print.attribute 中的方法
 Class<? extends Attribute> Attribute.getCategory()
          將此列印屬性值添加到屬性集時,為它獲取用作“類別別”的列印屬性類別。
 

參數型別為 Attribute 的 javax.print.attribute 中的方法
 boolean AttributeSet.add(Attribute attribute)
          如果指定的屬性尚不存在,則將它添加到此屬性集中,首先要移除與指定屬性值相同的屬性類別別中的任何現有值。
 boolean DocAttributeSet.add(Attribute attribute)
          如果指定的屬性值不存在,則將其添加到此屬性集中,方法是首先移除與指定屬性值相同的屬性類別別中的任何現有值(可選操作)。
 boolean HashAttributeSet.add(Attribute attribute)
          如果指定的屬性不存在,則將它添加到此屬性集中,方法是首先移除與指定屬性值相同的屬性類別別中的任何現有屬性。
 boolean PrintJobAttributeSet.add(Attribute attribute)
          如果指定的屬性值不存在,則將其添加到此屬性集中,方法是首先移除與指定屬性值相同的屬性類別別中的任何現有值(可選操作)。
 boolean PrintRequestAttributeSet.add(Attribute attribute)
          如果指定的屬性值不存在,則將其添加到此屬性集中,方法是首先移除與指定屬性值相同的屬性類別別中的任何現有值(可選操作)。
 boolean PrintServiceAttributeSet.add(Attribute attribute)
          如果指定的屬性值不存在,則將其添加到此屬性集中,方法是首先移除與指定屬性值相同的屬性類別別中的任何現有值(可選操作)。
 boolean AttributeSet.containsValue(Attribute attribute)
          如果此屬性集包含給定的屬性值,則返回 true。
 boolean HashAttributeSet.containsValue(Attribute attribute)
          如果此屬性集包含給定的屬性,則返回 true。
 boolean AttributeSet.remove(Attribute attribute)
          從此屬性集移除指定的屬性(如果存在)。
 boolean HashAttributeSet.remove(Attribute attribute)
          從此屬性集移除指定的屬性(如果存在)。
static void AttributeSetUtilities.verifyCategoryForValue(Class<?> category, Attribute attribute)
          驗證給定的屬性類別別物件是否等於給定屬性值物件的類別別。
 

參數型別為 Attribute 的 javax.print.attribute 中的建構子
HashAttributeSet(Attribute attribute)
          建構一個最初使用給定屬性填充的新屬性集。
HashAttributeSet(Attribute[] attributes)
          建構一個最初使用給定陣列中的值填充的新屬性集。
HashAttributeSet(Attribute[] attributes, Class<?> interfaceName)
          建構一個新的屬性集,其中該屬性集的成員限於給定的介面。
HashAttributeSet(Attribute attribute, Class<?> interfaceName)
          建構一個最初使用給定屬性填充的新屬性集,其中該屬性集的成員限於給定的介面。
 

javax.print.attribute.standard 中 Attribute 的使用
 

返回變數型別為 Attribute 的型別的 javax.print.attribute.standard 中的方法
 Class<? extends Attribute> Chromaticity.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> ColorSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Compression.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Copies.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> CopiesSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> DateTimeAtCompleted.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> DateTimeAtCreation.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> DateTimeAtProcessing.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Destination.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> DocumentName.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Fidelity.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Finishings.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobHoldUntil.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobImpressions.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobImpressionsCompleted.getCategory()
          獲取被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobImpressionsSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobKOctets.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobKOctetsProcessed.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobKOctetsSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobMediaSheets.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobMediaSheetsCompleted.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobMediaSheetsSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobMessageFromOperator.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobName.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobOriginatingUserName.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobPriority.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobPrioritySupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobSheets.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobState.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobStateReason.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> JobStateReasons.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Media.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> MediaPrintableArea.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> MediaSize.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> MultipleDocumentHandling.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> NumberOfDocuments.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> NumberOfInterveningJobs.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> NumberUp.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> NumberUpSupported.getCategory()
          獲取將被用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> OrientationRequested.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> OutputDeviceAssigned.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PDLOverrideSupported.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PageRanges.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PagesPerMinute.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PagesPerMinuteColor.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PresentationDirection.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrintQuality.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterInfo.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterIsAcceptingJobs.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterLocation.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterMakeAndModel.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterMessageFromOperator.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterMoreInfo.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterMoreInfoManufacturer.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterName.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterResolution.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterState.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterStateReason.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterStateReasons.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> PrinterURI.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> QueuedJobCount.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> ReferenceUriSchemesSupported.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> RequestingUserName.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Severity.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> SheetCollate.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 Class<? extends Attribute> Sides.getCategory()
          獲取將用作此列印屬性值的“類別別”的列印屬性類別。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

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