< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/JobSheets.java

Print this page




  27 import java.util.Locale;
  28 
  29 import javax.print.attribute.Attribute;
  30 import javax.print.attribute.EnumSyntax;
  31 import javax.print.attribute.PrintRequestAttribute;
  32 import javax.print.attribute.PrintJobAttribute;
  33 
  34 /**
  35  * Class JobSheets is a printing attribute class, an enumeration, that
  36  * determines which job start and end sheets, if any, must be printed with a
  37  * job. Class JobSheets declares keywords for standard job sheets values.
  38  * Implementation- or site-defined names for a job sheets attribute may also be
  39  * created by defining a subclass of class JobSheets.
  40  * <P>
  41  * The effect of a JobSheets attribute on multidoc print jobs (jobs with
  42  * multiple documents) may be affected by the {@link MultipleDocumentHandling
  43  * MultipleDocumentHandling} job attribute, depending on the meaning of the
  44  * particular JobSheets value.
  45  * <P>
  46  * <B>IPP Compatibility:</B>  The category name returned by
  47  * <CODE>getName()</CODE> is the IPP attribute name.  The
  48  * enumeration's integer value is the IPP enum value.  The
  49  * <code>toString()</code> method returns the IPP string representation of
  50  * the attribute value. For a subclass, the attribute value must be
  51  * localized to give the IPP name and natural language values.
  52  *
  53  * @author  Alan Kaminsky
  54  */
  55 public class JobSheets extends EnumSyntax
  56         implements PrintRequestAttribute, PrintJobAttribute {
  57 
  58     private static final long serialVersionUID = -4735258056132519759L;
  59 
  60     /**
  61      * No job sheets are printed.
  62      */
  63     public static final JobSheets NONE = new JobSheets(0);
  64 
  65     /**
  66      * One or more site specific standard job sheets are printed. e.g. a
  67      * single start sheet is printed, or both start and end sheets are
  68      * printed.
  69      */


 105 
 106     /**
 107      * Get the printing attribute class which is to be used as the "category"
 108      * for this printing attribute value.
 109      * <P>
 110      * For class JobSheets and any vendor-defined subclasses, the category is
 111      * class JobSheets itself.
 112      *
 113      * @return  Printing attribute class (category), an instance of class
 114      *          {@link java.lang.Class java.lang.Class}.
 115      */
 116     public final Class<? extends Attribute> getCategory() {
 117         return JobSheets.class;
 118     }
 119 
 120     /**
 121      * Get the name of the category of which this attribute value is an
 122      * instance.
 123      * <P>
 124      * For class JobSheets and any vendor-defined subclasses, the category
 125      * name is <CODE>"job-sheets"</CODE>.
 126      *
 127      * @return  Attribute category name.
 128      */
 129     public final String getName() {
 130         return "job-sheets";
 131     }
 132 
 133 }


  27 import java.util.Locale;
  28 
  29 import javax.print.attribute.Attribute;
  30 import javax.print.attribute.EnumSyntax;
  31 import javax.print.attribute.PrintRequestAttribute;
  32 import javax.print.attribute.PrintJobAttribute;
  33 
  34 /**
  35  * Class JobSheets is a printing attribute class, an enumeration, that
  36  * determines which job start and end sheets, if any, must be printed with a
  37  * job. Class JobSheets declares keywords for standard job sheets values.
  38  * Implementation- or site-defined names for a job sheets attribute may also be
  39  * created by defining a subclass of class JobSheets.
  40  * <P>
  41  * The effect of a JobSheets attribute on multidoc print jobs (jobs with
  42  * multiple documents) may be affected by the {@link MultipleDocumentHandling
  43  * MultipleDocumentHandling} job attribute, depending on the meaning of the
  44  * particular JobSheets value.
  45  * <P>
  46  * <B>IPP Compatibility:</B>  The category name returned by
  47  * {@code getName()} is the IPP attribute name.  The
  48  * enumeration's integer value is the IPP enum value.  The
  49  * {@code toString()} method returns the IPP string representation of
  50  * the attribute value. For a subclass, the attribute value must be
  51  * localized to give the IPP name and natural language values.
  52  *
  53  * @author  Alan Kaminsky
  54  */
  55 public class JobSheets extends EnumSyntax
  56         implements PrintRequestAttribute, PrintJobAttribute {
  57 
  58     private static final long serialVersionUID = -4735258056132519759L;
  59 
  60     /**
  61      * No job sheets are printed.
  62      */
  63     public static final JobSheets NONE = new JobSheets(0);
  64 
  65     /**
  66      * One or more site specific standard job sheets are printed. e.g. a
  67      * single start sheet is printed, or both start and end sheets are
  68      * printed.
  69      */


 105 
 106     /**
 107      * Get the printing attribute class which is to be used as the "category"
 108      * for this printing attribute value.
 109      * <P>
 110      * For class JobSheets and any vendor-defined subclasses, the category is
 111      * class JobSheets itself.
 112      *
 113      * @return  Printing attribute class (category), an instance of class
 114      *          {@link java.lang.Class java.lang.Class}.
 115      */
 116     public final Class<? extends Attribute> getCategory() {
 117         return JobSheets.class;
 118     }
 119 
 120     /**
 121      * Get the name of the category of which this attribute value is an
 122      * instance.
 123      * <P>
 124      * For class JobSheets and any vendor-defined subclasses, the category
 125      * name is {@code "job-sheets"}.
 126      *
 127      * @return  Attribute category name.
 128      */
 129     public final String getName() {
 130         return "job-sheets";
 131     }
 132 
 133 }
< prev index next >