59 * the client's requirements. |
59 * the client's requirements. |
60 * In some cases this may be more simply achieved by specifying a |
60 * In some cases this may be more simply achieved by specifying a |
61 * PrintQuality attribute which often controls resolution. |
61 * PrintQuality attribute which often controls resolution. |
62 * <P> |
62 * <P> |
63 * <B>IPP Compatibility:</B> The information needed to construct an IPP |
63 * <B>IPP Compatibility:</B> The information needed to construct an IPP |
64 * <CODE>"printer-resolution"</CODE> attribute can be obtained by calling |
64 * {@code "printer-resolution"} attribute can be obtained by calling |
65 * methods on the PrinterResolution object. The category name returned by |
65 * methods on the PrinterResolution object. The category name returned by |
66 * <CODE>getName()</CODE> gives the IPP attribute name. |
66 * {@code getName()} gives the IPP attribute name. |
67 * |
67 * |
68 * @author David Mendenhall |
68 * @author David Mendenhall |
69 * @author Alan Kaminsky |
69 * @author Alan Kaminsky |
70 */ |
70 */ |
71 public final class PrinterResolution extends ResolutionSyntax |
71 public final class PrinterResolution extends ResolutionSyntax |
79 * @param crossFeedResolution |
79 * @param crossFeedResolution |
80 * Cross feed direction resolution. |
80 * Cross feed direction resolution. |
81 * @param feedResolution |
81 * @param feedResolution |
82 * Feed direction resolution. |
82 * Feed direction resolution. |
83 * @param units |
83 * @param units |
84 * Unit conversion factor, e.g. <code>ResolutionSyntax.DPI</CODE> |
84 * Unit conversion factor, e.g. {@code ResolutionSyntax.DPI} |
85 * or <code>ResolutionSyntax.DPCM</CODE>. |
85 * or {@code ResolutionSyntax.DPCM}. |
86 * |
86 * |
87 * @exception IllegalArgumentException |
87 * @exception IllegalArgumentException |
88 * (unchecked exception) Thrown if {@code crossFeedResolution < 1} or |
88 * (unchecked exception) Thrown if {@code crossFeedResolution < 1} or |
89 * {@code feedResolution < 1} or {@code units < 1}. |
89 * {@code feedResolution < 1} or {@code units < 1}. |
90 */ |
90 */ |
97 * Returns whether this printer resolution attribute is equivalent to the |
97 * Returns whether this printer resolution attribute is equivalent to the |
98 * passed in object. To be equivalent, all of the following conditions |
98 * passed in object. To be equivalent, all of the following conditions |
99 * must be true: |
99 * must be true: |
100 * <OL TYPE=1> |
100 * <OL TYPE=1> |
101 * <LI> |
101 * <LI> |
102 * <CODE>object</CODE> is not null. |
102 * {@code object} is not null. |
103 * <LI> |
103 * <LI> |
104 * <CODE>object</CODE> is an instance of class PrinterResolution. |
104 * {@code object} is an instance of class PrinterResolution. |
105 * <LI> |
105 * <LI> |
106 * This attribute's cross feed direction resolution is equal to |
106 * This attribute's cross feed direction resolution is equal to |
107 * <CODE>object</CODE>'s cross feed direction resolution. |
107 * {@code object}'s cross feed direction resolution. |
108 * <LI> |
108 * <LI> |
109 * This attribute's feed direction resolution is equal to |
109 * This attribute's feed direction resolution is equal to |
110 * <CODE>object</CODE>'s feed direction resolution. |
110 * {@code object}'s feed direction resolution. |
111 * </OL> |
111 * </OL> |
112 * |
112 * |
113 * @param object Object to compare to. |
113 * @param object Object to compare to. |
114 * |
114 * |
115 * @return True if <CODE>object</CODE> is equivalent to this printer |
115 * @return True if {@code object} is equivalent to this printer |
116 * resolution attribute, false otherwise. |
116 * resolution attribute, false otherwise. |
117 */ |
117 */ |
118 public boolean equals(Object object) { |
118 public boolean equals(Object object) { |
119 return (super.equals (object) && |
119 return (super.equals (object) && |
120 object instanceof PrinterResolution); |
120 object instanceof PrinterResolution); |
136 /** |
136 /** |
137 * Get the name of the category of which this attribute value is an |
137 * Get the name of the category of which this attribute value is an |
138 * instance. |
138 * instance. |
139 * <P> |
139 * <P> |
140 * For class PrinterResolution, the |
140 * For class PrinterResolution, the |
141 * category name is <CODE>"printer-resolution"</CODE>. |
141 * category name is {@code "printer-resolution"}. |
142 * |
142 * |
143 * @return Attribute category name. |
143 * @return Attribute category name. |
144 */ |
144 */ |
145 public final String getName() { |
145 public final String getName() { |
146 return "printer-resolution"; |
146 return "printer-resolution"; |