KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > print > attribute > standard > PDLOverrideSupported


1 /*
2  * @(#)PDLOverrideSupported.java 1.8 04/05/05
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.print.attribute.standard;
8
9 import javax.print.attribute.Attribute JavaDoc;
10 import javax.print.attribute.EnumSyntax JavaDoc;
11 import javax.print.attribute.PrintServiceAttribute JavaDoc;
12
13 /**
14  * Class PDLOverrideSupported is a printing attribute class, an enumeration,
15  * that expresses the printer's ability to attempt to override processing
16  * instructions embedded in documents' print data with processing instructions
17  * specified as attributes outside the print data.
18  * <P>
19  * <B>IPP Compatibility:</B> The category name returned by
20  * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
21  * integer value is the IPP enum value. The <code>toString()</code> method
22  * returns the IPP string representation of the attribute value.
23  * <P>
24  *
25  * @author Alan Kaminsky
26  */

27 public class PDLOverrideSupported extends EnumSyntax JavaDoc
28     implements PrintServiceAttribute JavaDoc {
29
30     private static final long serialVersionUID = -4393264467928463934L;
31
32     /**
33      * The printer makes no attempt to make the external job attribute values
34      * take precedence over embedded instructions in the documents' print
35      * data.
36      */

37     public static final PDLOverrideSupported JavaDoc
38     NOT_ATTEMPTED = new PDLOverrideSupported JavaDoc(0);
39
40     /**
41      * The printer attempts to make the external job attribute values take
42      * precedence over embedded instructions in the documents' print data,
43      * however there is no guarantee.
44      */

45     public static final PDLOverrideSupported JavaDoc
46     ATTEMPTED = new PDLOverrideSupported JavaDoc(1);
47
48
49     /**
50      * Construct a new PDL override supported enumeration value with the given
51      * integer value.
52      *
53      * @param value Integer value.
54      */

55     protected PDLOverrideSupported(int value) {
56     super (value);
57     }
58
59     private static final String JavaDoc[] myStringTable = {
60     "not-attempted",
61     "attempted"
62     };
63
64     private static final PDLOverrideSupported JavaDoc[] myEnumValueTable = {
65     NOT_ATTEMPTED,
66     ATTEMPTED
67     };
68
69     /**
70      * Returns the string table for class PDLOverrideSupported.
71      */

72     protected String JavaDoc[] getStringTable() {
73     return (String JavaDoc[])myStringTable.clone();
74     }
75
76     /**
77      * Returns the enumeration value table for class PDLOverrideSupported.
78      */

79     protected EnumSyntax JavaDoc[] getEnumValueTable() {
80     return (EnumSyntax JavaDoc[])myEnumValueTable.clone();
81     }
82
83     /**
84      * Get the printing attribute class which is to be used as the "category"
85      * for this printing attribute value.
86      * <P>
87      * For class PDLOverrideSupported and any vendor-defined subclasses, the
88      * category is class PDLOverrideSupported itself.
89      *
90      * @return Printing attribute class (category), an instance of class
91      * {@link java.lang.Class java.lang.Class}.
92      */

93     public final Class JavaDoc<? extends Attribute JavaDoc> getCategory() {
94     return PDLOverrideSupported JavaDoc.class;
95     }
96
97     /**
98      * Get the name of the category of which this attribute value is an
99      * instance.
100      * <P>
101      * For class PDLOverrideSupported and any vendor-defined subclasses, the
102      * category name is <CODE>"pdl-override-supported"</CODE>.
103      *
104      * @return Attribute category name.
105      */

106     public final String JavaDoc getName() {
107     return "pdl-override-supported";
108     }
109
110 }
111
Popular Tags