25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
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 */
157
158 /**
159 * Get the printing attribute class which is to be used as the "category"
160 * for this printing attribute value.
161 * <P>
162 * For class PresentationDirection
163 * the category is class PresentationDirection itself.
164 *
165 * @return Printing attribute class (category), an instance of class
166 * {@link java.lang.Class java.lang.Class}.
167 */
168 public final Class<? extends Attribute> getCategory() {
169 return PresentationDirection.class;
170 }
171
172 /**
173 * Get the name of the category of which this attribute value is an
174 * instance.
175 * <P>
176 * For class PresentationDirection
177 * the category name is <CODE>"presentation-direction"</CODE>.
178 *
179 * @return Attribute category name.
180 */
181 public final String getName() {
182 return "presentation-direction";
183 }
184
185 }
|
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
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()} is the IPP attribute name. The enumeration's
46 * integer value is the IPP enum value. The {@code toString()} 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 */
157
158 /**
159 * Get the printing attribute class which is to be used as the "category"
160 * for this printing attribute value.
161 * <P>
162 * For class PresentationDirection
163 * the category is class PresentationDirection itself.
164 *
165 * @return Printing attribute class (category), an instance of class
166 * {@link java.lang.Class java.lang.Class}.
167 */
168 public final Class<? extends Attribute> getCategory() {
169 return PresentationDirection.class;
170 }
171
172 /**
173 * Get the name of the category of which this attribute value is an
174 * instance.
175 * <P>
176 * For class PresentationDirection
177 * the category name is {@code "presentation-direction"}.
178 *
179 * @return Attribute category name.
180 */
181 public final String getName() {
182 return "presentation-direction";
183 }
184
185 }
|