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

Print this page


   1 /*
   2  * Copyright (c) 2001, 2013, 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


  28 import javax.print.attribute.EnumSyntax;
  29 import javax.print.attribute.PrintJobAttribute;
  30 import javax.print.attribute.PrintRequestAttribute;
  31 
  32 /**
  33  * Class PresentationDirection is a printing attribute class, an enumeration,
  34  * that is used in conjunction with the {@link  NumberUp NumberUp} attribute to
  35  * indicate the layout of multiple print-stream pages to impose upon a
  36  * single side of an instance of a selected medium.
  37  * This is useful to mirror the text layout conventions of different scripts.
  38  * For example, English is "toright-tobottom", Hebrew is "toleft-tobottom"
  39  *  and Japanese is usually "tobottom-toleft".
  40  * <P>
  41  * <B>IPP Compatibility:</B>  This attribute is not an IPP 1.1
  42  * attribute; it is an attribute in the Production Printing Extension
  43  * (<a href="ftp://ftp.pwg.org/pub/pwg/standards/pwg5100.3.pdf">PDF</a>)
  44  * of IPP 1.1.  The category name returned by
  45  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  46  * integer value is the IPP enum value.  The <code>toString()</code> method
  47  * returns the IPP string representation of the attribute value.
  48  * <P>
  49  *
  50  * @author  Phil Race.
  51  */
  52 public final class PresentationDirection extends EnumSyntax
  53        implements PrintJobAttribute, PrintRequestAttribute  {
  54 
  55     private static final long serialVersionUID = 8294728067230931780L;
  56 
  57     /**
  58      * Pages are laid out in columns starting at the top left,
  59      * proceeding towards the bottom {@literal &} right.
  60      */
  61     public static final PresentationDirection TOBOTTOM_TORIGHT =
  62         new PresentationDirection(0);
  63 
  64     /**
  65      * Pages are laid out in columns starting at the top right,
  66      * proceeding towards the bottom {@literal &} left.
  67      */
  68     public static final PresentationDirection TOBOTTOM_TOLEFT =


   1 /*
   2  * Copyright (c) 2001, 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


  28 import javax.print.attribute.EnumSyntax;
  29 import javax.print.attribute.PrintJobAttribute;
  30 import javax.print.attribute.PrintRequestAttribute;
  31 
  32 /**
  33  * Class PresentationDirection is a printing attribute class, an enumeration,
  34  * that is used in conjunction with the {@link  NumberUp NumberUp} attribute to
  35  * indicate the layout of multiple print-stream pages to impose upon a
  36  * single side of an instance of a selected medium.
  37  * This is useful to mirror the text layout conventions of different scripts.
  38  * For example, English is "toright-tobottom", Hebrew is "toleft-tobottom"
  39  *  and Japanese is usually "tobottom-toleft".
  40  * <P>
  41  * <B>IPP Compatibility:</B>  This attribute is not an IPP 1.1
  42  * attribute; it is an attribute in the Production Printing Extension
  43  * (<a href="ftp://ftp.pwg.org/pub/pwg/standards/pwg5100.3.pdf">PDF</a>)
  44  * of IPP 1.1.  The category name returned by
  45  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  46  * integer value is the IPP enum value.  The <code>toString()</code> method
  47  * returns the IPP string representation of the attribute value.

  48  *
  49  * @author  Phil Race.
  50  */
  51 public final class PresentationDirection extends EnumSyntax
  52        implements PrintJobAttribute, PrintRequestAttribute  {
  53 
  54     private static final long serialVersionUID = 8294728067230931780L;
  55 
  56     /**
  57      * Pages are laid out in columns starting at the top left,
  58      * proceeding towards the bottom {@literal &} right.
  59      */
  60     public static final PresentationDirection TOBOTTOM_TORIGHT =
  61         new PresentationDirection(0);
  62 
  63     /**
  64      * Pages are laid out in columns starting at the top right,
  65      * proceeding towards the bottom {@literal &} left.
  66      */
  67     public static final PresentationDirection TOBOTTOM_TOLEFT =