22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.EnumSyntax;
29 import javax.print.attribute.PrintServiceAttribute;
30
31 /**
32 * Class PrinterState is a printing attribute class, an enumeration, that
33 * identifies the current state of a printer. Class PrinterState defines
34 * standard printer state values. A Print Service implementation only needs
35 * to report those printer states which are appropriate for the particular
36 * implementation; it does not have to report every defined printer state. The
37 * {@link PrinterStateReasons PrinterStateReasons} attribute augments the
38 * PrinterState attribute to give more detailed information about the printer
39 * in given printer state.
40 * <P>
41 * <B>IPP Compatibility:</B> The category name returned by
42 * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
43 * integer value is the IPP enum value. The <code>toString()</code> method
44 * returns the IPP string representation of the attribute value.
45 *
46 * @author Alan Kaminsky
47 */
48 public final class PrinterState extends EnumSyntax
49 implements PrintServiceAttribute {
50
51 private static final long serialVersionUID = -649578618346507718L;
52
53 /**
54 * The printer state is unknown.
55 */
56 public static final PrinterState UNKNOWN = new PrinterState(0);
57
58 /**
59 * Indicates that new jobs can start processing without waiting.
60 */
61 public static final PrinterState IDLE = new PrinterState(3);
62
63 /**
113 return myEnumValueTable;
114 }
115
116 /**
117 * Get the printing attribute class which is to be used as the "category"
118 * for this printing attribute value.
119 * <P>
120 * For class PrinterState, the category is class PrinterState itself.
121 *
122 * @return Printing attribute class (category), an instance of class
123 * {@link java.lang.Class java.lang.Class}.
124 */
125 public final Class<? extends Attribute> getCategory() {
126 return PrinterState.class;
127 }
128
129 /**
130 * Get the name of the category of which this attribute value is an
131 * instance.
132 * <P>
133 * For class PrinterState, the category name is <CODE>"printer-state"</CODE>.
134 *
135 * @return Attribute category name.
136 */
137 public final String getName() {
138 return "printer-state";
139 }
140
141 }
|
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.EnumSyntax;
29 import javax.print.attribute.PrintServiceAttribute;
30
31 /**
32 * Class PrinterState is a printing attribute class, an enumeration, that
33 * identifies the current state of a printer. Class PrinterState defines
34 * standard printer state values. A Print Service implementation only needs
35 * to report those printer states which are appropriate for the particular
36 * implementation; it does not have to report every defined printer state. The
37 * {@link PrinterStateReasons PrinterStateReasons} attribute augments the
38 * PrinterState attribute to give more detailed information about the printer
39 * in given printer state.
40 * <P>
41 * <B>IPP Compatibility:</B> The category name returned by
42 * {@code getName()} is the IPP attribute name. The enumeration's
43 * integer value is the IPP enum value. The {@code toString()} method
44 * returns the IPP string representation of the attribute value.
45 *
46 * @author Alan Kaminsky
47 */
48 public final class PrinterState extends EnumSyntax
49 implements PrintServiceAttribute {
50
51 private static final long serialVersionUID = -649578618346507718L;
52
53 /**
54 * The printer state is unknown.
55 */
56 public static final PrinterState UNKNOWN = new PrinterState(0);
57
58 /**
59 * Indicates that new jobs can start processing without waiting.
60 */
61 public static final PrinterState IDLE = new PrinterState(3);
62
63 /**
113 return myEnumValueTable;
114 }
115
116 /**
117 * Get the printing attribute class which is to be used as the "category"
118 * for this printing attribute value.
119 * <P>
120 * For class PrinterState, the category is class PrinterState itself.
121 *
122 * @return Printing attribute class (category), an instance of class
123 * {@link java.lang.Class java.lang.Class}.
124 */
125 public final Class<? extends Attribute> getCategory() {
126 return PrinterState.class;
127 }
128
129 /**
130 * Get the name of the category of which this attribute value is an
131 * instance.
132 * <P>
133 * For class PrinterState, the category name is {@code "printer-state"}.
134 *
135 * @return Attribute category name.
136 */
137 public final String getName() {
138 return "printer-state";
139 }
140
141 }
|