src/share/classes/javax/print/attribute/standard/PrinterState.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  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  * <P>
  46  *
  47  * @author  Alan Kaminsky
  48  */
  49 public final class PrinterState extends EnumSyntax
  50 implements PrintServiceAttribute {
  51 
  52     private static final long serialVersionUID = -649578618346507718L;
  53 
  54     /**
  55      * The printer state is unknown.
  56      */
  57     public static final PrinterState UNKNOWN = new PrinterState(0);
  58 
  59     /**
  60      * Indicates that new jobs can start processing without waiting.
  61      */
  62     public static final PrinterState IDLE = new PrinterState(3);
  63 
  64     /**
  65      * Indicates that jobs are processing;


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  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     /**
  64      * Indicates that jobs are processing;