8022175: Fix doclint warnings in javax.print

Reviewed-by: darcy
This commit is contained in:
Phil Race 2013-08-06 13:38:27 -07:00
parent 52112c7c19
commit 2ce2cb1e0d
25 changed files with 148 additions and 150 deletions

View File

@ -286,7 +286,7 @@ import java.io.Serializable;
* "autosensing" works is implementation dependent. In general, preformatted * "autosensing" works is implementation dependent. In general, preformatted
* autosense print data is provided in a byte oriented representation class * autosense print data is provided in a byte oriented representation class
* (byte array, InputStream, URL). * (byte array, InputStream, URL).
* * </UL>
* <P> * <P>
* <HR> * <HR>
* <H3>Service Formatted Print Data</H3> * <H3>Service Formatted Print Data</H3>
@ -545,7 +545,7 @@ public class DocFlavor implements Serializable, Cloneable {
* the match. * the match.
* @return String representing a mime parameter, or * @return String representing a mime parameter, or
* null if that parameter is not in the mime type string. * null if that parameter is not in the mime type string.
* @exception throws NullPointerException if paramName is null. * @exception NullPointerException if paramName is null.
*/ */
public String getParameter(String paramName) { public String getParameter(String paramName) {
return return

View File

@ -47,7 +47,7 @@ public interface MultiDocPrintJob extends DocPrintJob {
* PrintJobListener. * PrintJobListener.
* *
* @param multiDoc The documents to be printed. ALL must be a flavor * @param multiDoc The documents to be printed. ALL must be a flavor
* supported by the PrintJob & PrintService. * supported by the PrintJob {@literal &} PrintService.
* *
* @param attributes The job attributes to be applied to this print job. * @param attributes The job attributes to be applied to this print job.
* If this parameter is null then the default attributes are used. * If this parameter is null then the default attributes are used.

View File

@ -40,7 +40,7 @@ import javax.print.event.PrintServiceAttributeListener;
* a printer's supported attributes. * a printer's supported attributes.
* <P> * <P>
* Example: * Example:
* <PRE> * <PRE>{@code
* DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT; * DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
* PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); * PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
* aset.add(MediaSizeName.ISO_A4); * aset.add(MediaSizeName.ISO_A4);
@ -56,7 +56,7 @@ import javax.print.event.PrintServiceAttributeListener;
* } catch (PrintException e) { * } catch (PrintException e) {
* } * }
* } * }
* </PRE> * }</PRE>
*/ */
public interface PrintService { public interface PrintService {

View File

@ -118,7 +118,7 @@ public class ServiceUI {
* any changes made by the user. * any changes made by the user.
* *
* A typical basic usage of this method may be : * A typical basic usage of this method may be :
* <pre> * <pre>{@code
* PrintService[] services = PrintServiceLookup.lookupPrintServices( * PrintService[] services = PrintServiceLookup.lookupPrintServices(
* DocFlavor.INPUT_STREAM.JPEG, null); * DocFlavor.INPUT_STREAM.JPEG, null);
* PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); * PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
@ -131,7 +131,7 @@ public class ServiceUI {
* ... print ... * ... print ...
* } * }
* } * }
* </pre> * }</pre>
* <p> * <p>
* @param gc used to select screen. null means primary or default screen. * @param gc used to select screen. null means primary or default screen.

View File

@ -39,8 +39,8 @@ package javax.print;
* initialize services only when needed without any API dependencies * initialize services only when needed without any API dependencies
* except in an environment in which they are used. * except in an environment in which they are used.
* <p> * <p>
* Swing UIs are preferred as they provide a more consistent L&F and * Swing UIs are preferred as they provide a more consistent {@literal L&F}
* can support accessibility APIs. * and can support accessibility APIs.
* <p> * <p>
* Example usage: * Example usage:
* <pre> * <pre>

View File

@ -42,7 +42,7 @@ package javax.print.attribute;
* class rather than the attribute object's class itself. An attribute * class rather than the attribute object's class itself. An attribute
* object's * object's
* category is determined by calling the {@link Attribute#getCategory() * category is determined by calling the {@link Attribute#getCategory()
* <CODE>getCategory()</CODE>} method defined in interface {@link Attribute * getCategory()} method defined in interface {@link Attribute
* Attribute}. * Attribute}.
* <P> * <P>
* The interfaces of an AttributeSet resemble those of the Java Collections * The interfaces of an AttributeSet resemble those of the Java Collections
@ -217,7 +217,7 @@ public interface AttributeSet {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the = * The outcome is the same as if the =
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with each * operation had been applied to this attribute set successively with each
* element from the specified set. * element from the specified set.
* The behavior of the <CODE>addAll(AttributeSet)</CODE> * The behavior of the <CODE>addAll(AttributeSet)</CODE>
@ -301,7 +301,7 @@ public interface AttributeSet {
* This ensures that <tt>t1.equals(t2)</tt> implies that * This ensures that <tt>t1.equals(t2)</tt> implies that
* <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets * <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets
* <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of * <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of
* {@link java.lang.Object#hashCode() <CODE>Object.hashCode()</CODE>}. * {@link java.lang.Object#hashCode() Object.hashCode()}.
* *
* @return The hash code value for this attribute set. * @return The hash code value for this attribute set.
*/ */

View File

@ -36,9 +36,9 @@ import java.util.Date;
* <P> * <P>
* Under the hood, a date-time attribute is stored as a value of class <code> * Under the hood, a date-time attribute is stored as a value of class <code>
* java.util.Date</code>. You can get a date-time attribute's Date value by * java.util.Date</code>. You can get a date-time attribute's Date value by
* calling {@link #getValue() <CODE>getValue()</CODE>}. A date-time attribute's * calling {@link #getValue() getValue()}. A date-time attribute's
* Date value is established when it is constructed (see {@link * Date value is established when it is constructed (see {@link
* #DateTimeSyntax(Date) <CODE>DateTimeSyntax(Date)</CODE>}). Once * #DateTimeSyntax(Date) DateTimeSyntax(Date)}). Once
* constructed, a date-time attribute's value is immutable. * constructed, a date-time attribute's value is immutable.
* <P> * <P>
* To construct a date-time attribute from separate values of the year, month, * To construct a date-time attribute from separate values of the year, month,

View File

@ -37,8 +37,8 @@ package javax.print.attribute;
* constructors and mutating operations guarantee an additional invariant, * constructors and mutating operations guarantee an additional invariant,
* namely that all attribute values in the DocAttributeSet must be instances * namely that all attribute values in the DocAttributeSet must be instances
* of interface {@link DocAttribute DocAttribute}. * of interface {@link DocAttribute DocAttribute}.
* The {@link #add(Attribute) <CODE>add(Attribute)</CODE>}, and * The {@link #add(Attribute) add(Attribute)}, and
* {@link #addAll(AttributeSet) <CODE>addAll(AttributeSet)</CODE>} operations * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
* are respecified below to guarantee this additional invariant. * are respecified below to guarantee this additional invariant.
* <P> * <P>
* *
@ -74,7 +74,7 @@ public interface DocAttributeSet extends AttributeSet {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the * The outcome is the same as if the
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with * operation had been applied to this attribute set successively with
* each element from the specified set. If none of the categories in the * each element from the specified set. If none of the categories in the
* specified set are the same as any categories in this attribute set, * specified set are the same as any categories in this attribute set,

View File

@ -81,15 +81,15 @@ import java.io.Serializable;
* for identical objects (<CODE>==</CODE>). * for identical objects (<CODE>==</CODE>).
* <P> * <P>
* You can convert an enumeration value to a string by calling {@link * You can convert an enumeration value to a string by calling {@link
* #toString() <CODE>toString()</CODE>}. The string is obtained from a table * #toString() toString()}. The string is obtained from a table
* supplied by the enumeration class. * supplied by the enumeration class.
* <P> * <P>
* Under the hood, an enumeration value is just an integer, a different integer * Under the hood, an enumeration value is just an integer, a different integer
* for each enumeration value within an enumeration class. You can get an * for each enumeration value within an enumeration class. You can get an
* enumeration value's integer value by calling {@link #getValue() * enumeration value's integer value by calling {@link #getValue()
* <CODE>getValue()</CODE>}. An enumeration value's integer value is established * getValue()}. An enumeration value's integer value is established
* when it is constructed (see {@link #EnumSyntax(int) * when it is constructed (see {@link #EnumSyntax(int)
* <CODE>EnumSyntax(int)</CODE>}). Since the constructor is protected, the only * EnumSyntax(int)}). Since the constructor is protected, the only
* possible enumeration values are the singleton objects declared in the * possible enumeration values are the singleton objects declared in the
* enumeration class; additional enumeration values cannot be created at run * enumeration class; additional enumeration values cannot be created at run
* time. * time.
@ -170,10 +170,10 @@ public abstract class EnumSyntax implements Serializable, Cloneable {
* *
* @return The enumeration singleton value stored at index * @return The enumeration singleton value stored at index
* <I>i</I>-<I>L</I> in the enumeration value table returned by * <I>i</I>-<I>L</I> in the enumeration value table returned by
* {@link #getEnumValueTable() <CODE>getEnumValueTable()</CODE>}, * {@link #getEnumValueTable() getEnumValueTable()},
* where <I>i</I> is this enumeration value's integer value and * where <I>i</I> is this enumeration value's integer value and
* <I>L</I> is the value returned by {@link #getOffset() * <I>L</I> is the value returned by {@link #getOffset()
* <CODE>getOffset()</CODE>}. * getOffset()}.
* *
* @throws ObjectStreamException if the stream can't be deserialised * @throws ObjectStreamException if the stream can't be deserialised
* @throws InvalidObjectException * @throws InvalidObjectException
@ -220,18 +220,18 @@ public abstract class EnumSyntax implements Serializable, Cloneable {
* Returns the string table for this enumeration value's enumeration class. * Returns the string table for this enumeration value's enumeration class.
* The enumeration class's integer values are assumed to lie in the range * The enumeration class's integer values are assumed to lie in the range
* <I>L</I>..<I>L</I>+<I>N</I>-1, where <I>L</I> is the value returned by * <I>L</I>..<I>L</I>+<I>N</I>-1, where <I>L</I> is the value returned by
* {@link #getOffset() <CODE>getOffset()</CODE>} and <I>N</I> is the length * {@link #getOffset() getOffset()} and <I>N</I> is the length
* of the string table. The element in the string table at index * of the string table. The element in the string table at index
* <I>i</I>-<I>L</I> is the value returned by {@link #toString() * <I>i</I>-<I>L</I> is the value returned by {@link #toString()
* <CODE>toString()</CODE>} for the enumeration value whose integer value * toString()} for the enumeration value whose integer value
* is <I>i</I>. If an integer within the above range is not used by any * is <I>i</I>. If an integer within the above range is not used by any
* enumeration value, leave the corresponding table element null. * enumeration value, leave the corresponding table element null.
* <P> * <P>
* The default implementation returns null. If the enumeration class (a * The default implementation returns null. If the enumeration class (a
* subclass of class EnumSyntax) does not override this method to return a * subclass of class EnumSyntax) does not override this method to return a
* non-null string table, and the subclass does not override the {@link * non-null string table, and the subclass does not override the {@link
* #toString() <CODE>toString()</CODE>} method, the base class {@link * #toString() toString()} method, the base class {@link
* #toString() <CODE>toString()</CODE>} method will return just a string * #toString() toString()} method will return just a string
* representation of this enumeration value's integer value. * representation of this enumeration value's integer value.
* @return the string table * @return the string table
*/ */
@ -243,11 +243,11 @@ public abstract class EnumSyntax implements Serializable, Cloneable {
* Returns the enumeration value table for this enumeration value's * Returns the enumeration value table for this enumeration value's
* enumeration class. The enumeration class's integer values are assumed to * enumeration class. The enumeration class's integer values are assumed to
* lie in the range <I>L</I>..<I>L</I>+<I>N</I>-1, where <I>L</I> is the * lie in the range <I>L</I>..<I>L</I>+<I>N</I>-1, where <I>L</I> is the
* value returned by {@link #getOffset() <CODE>getOffset()</CODE>} and * value returned by {@link #getOffset() getOffset()} and
* <I>N</I> is the length of the enumeration value table. The element in the * <I>N</I> is the length of the enumeration value table. The element in the
* enumeration value table at index <I>i</I>-<I>L</I> is the enumeration * enumeration value table at index <I>i</I>-<I>L</I> is the enumeration
* value object whose integer value is <I>i</I>; the {@link #readResolve() * value object whose integer value is <I>i</I>; the {@link #readResolve()
* <CODE>readResolve()</CODE>} method needs this to preserve singleton * readResolve()} method needs this to preserve singleton
* semantics during deserialization of an enumeration instance. If an * semantics during deserialization of an enumeration instance. If an
* integer within the above range is not used by any enumeration value, * integer within the above range is not used by any enumeration value,
* leave the corresponding table element null. * leave the corresponding table element null.
@ -255,8 +255,8 @@ public abstract class EnumSyntax implements Serializable, Cloneable {
* The default implementation returns null. If the enumeration class (a * The default implementation returns null. If the enumeration class (a
* subclass of class EnumSyntax) does not override this method to return * subclass of class EnumSyntax) does not override this method to return
* a non-null enumeration value table, and the subclass does not override * a non-null enumeration value table, and the subclass does not override
* the {@link #readResolve() <CODE>readResolve()</CODE>} method, the base * the {@link #readResolve() readResolve()} method, the base
* class {@link #readResolve() <CODE>readResolve()</CODE>} method will throw * class {@link #readResolve() readResolve()} method will throw
* an exception whenever an enumeration instance is deserialized from an * an exception whenever an enumeration instance is deserialized from an
* object input stream. * object input stream.
* @return the value table * @return the value table

View File

@ -388,7 +388,7 @@ public class HashAttributeSet implements AttributeSet, Serializable {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the * The outcome is the same as if the
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with * operation had been applied to this attribute set successively with
* each element from the specified set. * each element from the specified set.
* The behavior of the <CODE>addAll(AttributeSet)</CODE> * The behavior of the <CODE>addAll(AttributeSet)</CODE>
@ -512,7 +512,7 @@ public class HashAttributeSet implements AttributeSet, Serializable {
* This ensures that <tt>t1.equals(t2)</tt> implies that * This ensures that <tt>t1.equals(t2)</tt> implies that
* <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets * <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets
* <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of * <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of
* {@link java.lang.Object#hashCode() <CODE>Object.hashCode()</CODE>}. * {@link java.lang.Object#hashCode() Object.hashCode()}.
* *
* @return The hash code value for this attribute set. * @return The hash code value for this attribute set.
*/ */

View File

@ -33,9 +33,9 @@ import java.io.Serializable;
* <P> * <P>
* Under the hood, an integer attribute is just an integer. You can get an * Under the hood, an integer attribute is just an integer. You can get an
* integer attribute's integer value by calling {@link #getValue() * integer attribute's integer value by calling {@link #getValue()
* <CODE>getValue()</CODE>}. An integer attribute's integer value is * getValue()}. An integer attribute's integer value is
* established when it is constructed (see {@link #IntegerSyntax(int) * established when it is constructed (see {@link #IntegerSyntax(int)
* <CODE>IntegerSyntax(int)</CODE>}). Once constructed, an integer attribute's * IntegerSyntax(int)}). Once constructed, an integer attribute's
* value is immutable. * value is immutable.
* <P> * <P>
* *

View File

@ -36,8 +36,8 @@ package javax.print.attribute;
* constructors and mutating operations guarantee an additional invariant, * constructors and mutating operations guarantee an additional invariant,
* namely that all attribute values in the PrintJobAttributeSet must be * namely that all attribute values in the PrintJobAttributeSet must be
* instances of interface {@link PrintJobAttribute PrintJobAttribute}. * instances of interface {@link PrintJobAttribute PrintJobAttribute}.
* The {@link #add(Attribute) <CODE>add(Attribute)</CODE>}, and * The {@link #add(Attribute) add(Attribute)}, and
* {@link #addAll(AttributeSet) <CODE>addAll(AttributeSet)</CODE>} operations * {@link #addAll(AttributeSet) >addAll(AttributeSet)} operations
* are respecified below to guarantee this additional invariant. * are respecified below to guarantee this additional invariant.
* <P> * <P>
* *
@ -72,7 +72,7 @@ public interface PrintJobAttributeSet extends AttributeSet {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the * The outcome is the same as if the
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with * operation had been applied to this attribute set successively with
* each element from the specified set. If none of the categories in the * each element from the specified set. If none of the categories in the
* specified set are the same as any categories in this attribute set, * specified set are the same as any categories in this attribute set,

View File

@ -37,8 +37,8 @@ package javax.print.attribute;
* constructors and mutating operations guarantee an additional invariant, * constructors and mutating operations guarantee an additional invariant,
* namely that all attribute values in the PrintRequestAttributeSet must be * namely that all attribute values in the PrintRequestAttributeSet must be
* instances of interface {@link PrintRequestAttribute PrintRequestAttribute}. * instances of interface {@link PrintRequestAttribute PrintRequestAttribute}.
* The {@link #add(Attribute) <CODE>add(Attribute)</CODE>}, and * The {@link #add(Attribute) add(Attribute)}, and
* {@link #addAll(AttributeSet) <CODE>addAll(AttributeSet)</CODE>} operations * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
* are respecified below to guarantee this additional invariant. * are respecified below to guarantee this additional invariant.
* <P> * <P>
* *
@ -73,7 +73,7 @@ public interface PrintRequestAttributeSet extends AttributeSet {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the * The outcome is the same as if the
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with * operation had been applied to this attribute set successively with
* each element from the specified set. If none of the categories in the * each element from the specified set. If none of the categories in the
* specified set are the same as any categories in this attribute set, * specified set are the same as any categories in this attribute set,

View File

@ -39,8 +39,8 @@ package javax.print.attribute;
* invariant, * invariant,
* namely that all attribute values in the PrintServiceAttributeSet must be * namely that all attribute values in the PrintServiceAttributeSet must be
* instances of interface {@link PrintServiceAttribute PrintServiceAttribute}. * instances of interface {@link PrintServiceAttribute PrintServiceAttribute}.
* The {@link #add(Attribute) <CODE>add(Attribute)</CODE>}, and * The {@link #add(Attribute) add(Attribute)}, and
* {@link #addAll(AttributeSet) <CODE>addAll(AttributeSet)</CODE>} operations * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
* are respecified below to guarantee this additional invariant. * are respecified below to guarantee this additional invariant.
* <P> * <P>
* *
@ -77,7 +77,7 @@ public interface PrintServiceAttributeSet extends AttributeSet {
/** /**
* Adds all of the elements in the specified set to this attribute. * Adds all of the elements in the specified set to this attribute.
* The outcome is the same as if the * The outcome is the same as if the
* {@link #add(Attribute) <CODE>add(Attribute)</CODE>} * {@link #add(Attribute) add(Attribute)}
* operation had been applied to this attribute set successively with * operation had been applied to this attribute set successively with
* each element from the specified set. If none of the categories in the * each element from the specified set. If none of the categories in the
* specified set are the same as any categories in this attribute set, * specified set are the same as any categories in this attribute set,

View File

@ -39,7 +39,7 @@ import java.io.Serializable;
* resolution attribute's values, indicating the units in which the values are * resolution attribute's values, indicating the units in which the values are
* to be returned. The two most common resolution units are dots per inch (dpi) * to be returned. The two most common resolution units are dots per inch (dpi)
* and dots per centimeter (dpcm), and exported constants {@link #DPI * and dots per centimeter (dpcm), and exported constants {@link #DPI
* <CODE>DPI</CODE>} and {@link #DPCM <CODE>DPCM</CODE>} are provided for * DPI} and {@link #DPCM DPCM} are provided for
* indicating those units. * indicating those units.
* <P> * <P>
* Once constructed, a resolution attribute's value is immutable. * Once constructed, a resolution attribute's value is immutable.
@ -68,9 +68,9 @@ import java.io.Serializable;
* done, which would not be guaranteed if a floating point representation were * done, which would not be guaranteed if a floating point representation were
* used. * used.
* <P> * <P>
* The exported constant {@link #DPI <CODE>DPI</CODE>} is actually the * The exported constant {@link #DPI DPI} is actually the
* conversion factor by which to multiply a value in dpi to get the value in * conversion factor by which to multiply a value in dpi to get the value in
* dphi. Likewise, the exported constant {@link #DPCM <CODE>DPCM</CODE>} is the * dphi. Likewise, the exported constant {@link #DPCM DPCM} is the
* conversion factor by which to multiply a value in dpcm to get the value in * conversion factor by which to multiply a value in dpcm to get the value in
* dphi. A client can specify a resolution value in units other than dpi or dpcm * dphi. A client can specify a resolution value in units other than dpi or dpcm
* by supplying its own conversion factor. However, since the internal units of * by supplying its own conversion factor. However, since the internal units of
@ -120,12 +120,12 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* @param feedResolution * @param feedResolution
* Feed direction resolution. * Feed direction resolution.
* @param units * @param units
* Unit conversion factor, e.g. {@link #DPI <CODE>DPI</CODE>} or * Unit conversion factor, e.g. {@link #DPI DPI} or
* {@link #DPCM <CODE>DPCM</CODE>}. * {@link #DPCM DPCM}.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>crossFeedResolution</CODE> < * (unchecked exception) Thrown if {@code crossFeedResolution < 1}
* 1 or <CODE>feedResolution</CODE> < 1 or <CODE>units</CODE> < 1. * or {@code feedResolution < 1} or {@code units < 1}.
*/ */
public ResolutionSyntax(int crossFeedResolution, int feedResolution, public ResolutionSyntax(int crossFeedResolution, int feedResolution,
int units) { int units) {
@ -172,14 +172,14 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* The values are rounded to the nearest integer. * The values are rounded to the nearest integer.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #DPI <CODE>DPI</CODE>} or * Unit conversion factor, e.g. {@link #DPI DPI} or
* {@link #DPCM <CODE>DPCM</CODE>}. * {@link #DPCM DPCM}.
* *
* @return A two-element array with the cross feed direction resolution * @return A two-element array with the cross feed direction resolution
* at index 0 and the feed direction resolution at index 1. * at index 0 and the feed direction resolution at index 1.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public int[] getResolution(int units) { public int[] getResolution(int units) {
return new int[] { getCrossFeedResolution(units), return new int[] { getCrossFeedResolution(units),
@ -192,13 +192,13 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* the given units. The value is rounded to the nearest integer. * the given units. The value is rounded to the nearest integer.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #DPI <CODE>DPI</CODE>} or * Unit conversion factor, e.g. {@link #DPI DPI} or
* {@link #DPCM <CODE>DPCM</CODE>}. * {@link #DPCM DPCM}.
* *
* @return Cross feed direction resolution. * @return Cross feed direction resolution.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public int getCrossFeedResolution(int units) { public int getCrossFeedResolution(int units) {
return convertFromDphi (crossFeedResolution, units); return convertFromDphi (crossFeedResolution, units);
@ -209,13 +209,13 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* given units. The value is rounded to the nearest integer. * given units. The value is rounded to the nearest integer.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #DPI <CODE>DPI</CODE>} or {@link * Unit conversion factor, e.g. {@link #DPI DPI} or {@link
* #DPCM <CODE>DPCM</CODE>}. * #DPCM DPCM}.
* *
* @return Feed direction resolution. * @return Feed direction resolution.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public int getFeedResolution(int units) { public int getFeedResolution(int units) {
return convertFromDphi (feedResolution, units); return convertFromDphi (feedResolution, units);
@ -229,8 +229,8 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* rounded to the nearest integer. * rounded to the nearest integer.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #DPI <CODE>DPI</CODE>} or {@link * Unit conversion factor, e.g. {@link #DPI CODE>DPI} or {@link
* #DPCM <CODE>DPCM</CODE>}. * #DPCM DPCM}.
* @param unitsName * @param unitsName
* Units name string, e.g. <CODE>"dpi"</CODE> or <CODE>"dpcm"</CODE>. If * Units name string, e.g. <CODE>"dpi"</CODE> or <CODE>"dpcm"</CODE>. If
* null, no units name is appended to the result. * null, no units name is appended to the result.
@ -238,7 +238,7 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable {
* @return String version of this resolution attribute. * @return String version of this resolution attribute.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public String toString(int units, String unitsName) { public String toString(int units, String unitsName) {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();

View File

@ -38,8 +38,8 @@ import java.io.Serializable;
* values are measured. Methods are provided to return a two-dimensional size * values are measured. Methods are provided to return a two-dimensional size
* attribute's values, indicating the units in which the values are to be * attribute's values, indicating the units in which the values are to be
* returned. The two most common size units are inches (in) and millimeters * returned. The two most common size units are inches (in) and millimeters
* (mm), and exported constants {@link #INCH <CODE>INCH</CODE>} and {@link #MM * (mm), and exported constants {@link #INCH INCH} and {@link #MM
* <CODE>MM</CODE>} are provided for indicating those units. * MM} are provided for indicating those units.
* <P> * <P>
* Once constructed, a two-dimensional size attribute's value is immutable. * Once constructed, a two-dimensional size attribute's value is immutable.
* <P> * <P>
@ -66,9 +66,9 @@ import java.io.Serializable;
* units, you have to search for a media size of 215.9 x 279.4 mm; rounding off * units, you have to search for a media size of 215.9 x 279.4 mm; rounding off
* to an integral 216 x 279 mm will not match. * to an integral 216 x 279 mm will not match.
* <P> * <P>
* The exported constant {@link #INCH <CODE>INCH</CODE>} is actually the * The exported constant {@link #INCH INCH} is actually the
* conversion factor by which to multiply a value in inches to get the value in * conversion factor by which to multiply a value in inches to get the value in
* &#181;m. Likewise, the exported constant {@link #MM <CODE>MM</CODE>} is the * &#181;m. Likewise, the exported constant {@link #MM MM} is the
* conversion factor by which to multiply a value in mm to get the value in * conversion factor by which to multiply a value in mm to get the value in
* &#181;m. A client can specify a resolution value in units other than inches * &#181;m. A client can specify a resolution value in units other than inches
* or mm by supplying its own conversion factor. However, since the internal * or mm by supplying its own conversion factor. However, since the internal
@ -117,12 +117,12 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* @param x X dimension. * @param x X dimension.
* @param y Y dimension. * @param y Y dimension.
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or
* {@link #MM <CODE>MM</CODE>}. * {@link #MM MM}.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* < 0 or <CODE>units</CODE> < 1. * {@code units < 1}.
*/ */
protected Size2DSyntax(float x, float y, int units) { protected Size2DSyntax(float x, float y, int units) {
if (x < 0.0f) { if (x < 0.0f) {
@ -145,12 +145,12 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* @param x X dimension. * @param x X dimension.
* @param y Y dimension. * @param y Y dimension.
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or
* {@link #MM <CODE>MM</CODE>}. * {@link #MM MM}.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0}
* < 0 or <CODE>units</CODE> < 1. * or {@code units < 1}.
*/ */
protected Size2DSyntax(int x, int y, int units) { protected Size2DSyntax(int x, int y, int units) {
if (x < 0) { if (x < 0) {
@ -193,14 +193,13 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* as floating-point values. * as floating-point values.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or {@link #MM MM}.
* {@link #MM <CODE>MM</CODE>}.
* *
* @return A two-element array with the X dimension at index 0 and the Y * @return A two-element array with the X dimension at index 0 and the Y
* dimension at index 1. * dimension at index 1.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float[] getSize(int units) { public float[] getSize(int units) {
return new float[] {getX(units), getY(units)}; return new float[] {getX(units), getY(units)};
@ -211,13 +210,12 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* units as a floating-point value. * units as a floating-point value.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or {@link #MM MM}.
* {@link #MM <CODE>MM</CODE>}.
* *
* @return X dimension. * @return X dimension.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getX(int units) { public float getX(int units) {
return convertFromMicrometers(x, units); return convertFromMicrometers(x, units);
@ -228,13 +226,12 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* units as a floating-point value. * units as a floating-point value.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or {@link #MM MM}.
* {@link #MM <CODE>MM</CODE>}.
* *
* @return Y dimension. * @return Y dimension.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getY(int units) { public float getY(int units) {
return convertFromMicrometers(y, units); return convertFromMicrometers(y, units);
@ -248,16 +245,16 @@ public abstract class Size2DSyntax implements Serializable, Cloneable {
* floating point. * floating point.
* *
* @param units * @param units
* Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or * Unit conversion factor, e.g. {@link #INCH INCH} or {@link #MM MM}.
* {@link #MM <CODE>MM</CODE>}. *
* @param unitsName * @param unitsName
* Units name string, e.g. <CODE>"in"</CODE> or <CODE>"mm"</CODE>. If * Units name string, e.g. {@code in} or {@code mm}. If
* null, no units name is appended to the result. * null, no units name is appended to the result.
* *
* @return String version of this two-dimensional size attribute. * @return String version of this two-dimensional size attribute.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public String toString(int units, String unitsName) { public String toString(int units, String unitsName) {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();

View File

@ -40,11 +40,11 @@ import javax.print.attribute.PrintJobAttribute;
* can be verified to support color printing. * can be verified to support color printing.
* <P> * <P>
* The table below shows the effects of specifying a Chromaticity attribute of * The table below shows the effects of specifying a Chromaticity attribute of
* {@link #MONOCHROME <CODE>MONOCHROME</CODE>} or {@link #COLOR * {@link #MONOCHROME MONOCHROME} or {@link #COLOR COLOR}
* <CODE>COLOR</CODE>} for a monochrome or color document. * for a monochrome or color document.
* <P> * <P>
* <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Shows effects of specifying MONOCHROME or COLOR Chromaticity attributes"> * <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Shows effects of specifying MONOCHROME or COLOR Chromaticity attributes">
* <TR BGCOLOR="#E5E5E5"> * <TR>
* <TH> * <TH>
* Chromaticity<BR>Attribute * Chromaticity<BR>Attribute
* </TH> * </TH>
@ -57,7 +57,7 @@ import javax.print.attribute.PrintJobAttribute;
* </TR> * </TR>
* <TR> * <TR>
* <TD> * <TD>
* {@link #MONOCHROME <CODE>MONOCHROME</CODE>} * {@link #MONOCHROME MONOCHROME}
* </TD> * </TD>
* <TD> * <TD>
* Printed as is, in monochrome * Printed as is, in monochrome
@ -68,7 +68,7 @@ import javax.print.attribute.PrintJobAttribute;
* </TR> * </TR>
* <TR> * <TR>
* <TD> * <TD>
* {@link #COLOR <CODE>COLOR</CODE>} * {@link #COLOR COLOR}
* </TD> * </TD>
* <TD> * <TD>
* Printed as is, in monochrome * Printed as is, in monochrome

View File

@ -34,7 +34,7 @@ import javax.print.attribute.DocAttribute;
* print data (the doc), not of the Print Job. If a Compression attribute is not * print data (the doc), not of the Print Job. If a Compression attribute is not
* specified for a doc, the printer assumes the doc's print data is uncompressed * specified for a doc, the printer assumes the doc's print data is uncompressed
* (i.e., the default Compression value is always {@link #NONE * (i.e., the default Compression value is always {@link #NONE
* <CODE>NONE</CODE>}). * NONE}).
* <P> * <P>
* <B>IPP Compatibility:</B> The category name returned by * <B>IPP Compatibility:</B> The category name returned by
* <CODE>getName()</CODE> is the IPP attribute name. The enumeration's * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's

View File

@ -46,13 +46,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #NONE <CODE>NONE</CODE>} * {@link #NONE NONE}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE <CODE>STAPLE</CODE>} * {@link #STAPLE STAPLE}
* </TD> * </TD>
* <TD WIDTH=36%> * <TD WIDTH=36%>
* {@link #EDGE_STITCH <CODE>EDGE_STITCH</CODE>} * {@link #EDGE_STITCH EDGE_STITCH}
* </TD> * </TD>
* </TR> * </TR>
* <TR> * <TR>
@ -60,13 +60,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD> * <TD>
* {@link #BIND <CODE>BIND</CODE>} * {@link #BIND BIND}
* </TD> * </TD>
* <TD> * <TD>
* {@link #SADDLE_STITCH <CODE>SADDLE_STITCH</CODE>} * {@link #SADDLE_STITCH SADDLE_STITCH}
* </TD> * </TD>
* <TD> * <TD>
* {@link #COVER <CODE>COVER</CODE>} * {@link #COVER COVER}
* </TD> * </TD>
* <TD> * <TD>
* &nbsp; * &nbsp;
@ -82,13 +82,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_TOP_LEFT <CODE>STAPLE_TOP_LEFT</CODE>} * {@link #STAPLE_TOP_LEFT STAPLE_TOP_LEFT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #EDGE_STITCH_LEFT <CODE>EDGE_STITCH_LEFT</CODE>} * {@link #EDGE_STITCH_LEFT EDGE_STITCH_LEFT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_DUAL_LEFT <CODE>STAPLE_DUAL_LEFT</CODE>} * {@link #STAPLE_DUAL_LEFT STAPLE_DUAL_LEFT}
* </TD> * </TD>
* <TD WIDTH=9%> * <TD WIDTH=9%>
* &nbsp; * &nbsp;
@ -99,13 +99,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_BOTTOM_LEFT <CODE>STAPLE_BOTTOM_LEFT</CODE>} * {@link #STAPLE_BOTTOM_LEFT STAPLE_BOTTOM_LEFT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #EDGE_STITCH_TOP <CODE>EDGE_STITCH_TOP</CODE>} * {@link #EDGE_STITCH_TOP EDGE_STITCH_TOP}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_DUAL_TOP <CODE>STAPLE_DUAL_TOP</CODE>} * {@link #STAPLE_DUAL_TOP STAPLE_DUAL_TOP}
* </TD> * </TD>
* <TD WIDTH=9%> * <TD WIDTH=9%>
* &nbsp; * &nbsp;
@ -116,13 +116,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_TOP_RIGHT <CODE>STAPLE_TOP_RIGHT</CODE>} * {@link #STAPLE_TOP_RIGHT STAPLE_TOP_RIGHT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #EDGE_STITCH_RIGHT <CODE>EDGE_STITCH_RIGHT</CODE>} * {@link #EDGE_STITCH_RIGHT EDGE_STITCH_RIGHT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_DUAL_RIGHT <CODE>STAPLE_DUAL_RIGHT</CODE>} * {@link #STAPLE_DUAL_RIGHT STAPLE_DUAL_RIGHT}
* </TD> * </TD>
* <TD WIDTH=9%> * <TD WIDTH=9%>
* &nbsp; * &nbsp;
@ -133,13 +133,13 @@ import javax.print.attribute.PrintJobAttribute;
* &nbsp; * &nbsp;
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_BOTTOM_RIGHT <CODE>STAPLE_BOTTOM_RIGHT</CODE>} * {@link #STAPLE_BOTTOM_RIGHT STAPLE_BOTTOM_RIGHT}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #EDGE_STITCH_BOTTOM <CODE>EDGE_STITCH_BOTTOM</CODE>} * {@link #EDGE_STITCH_BOTTOM EDGE_STITCH_BOTTOM}
* </TD> * </TD>
* <TD WIDTH=27%> * <TD WIDTH=27%>
* {@link #STAPLE_DUAL_BOTTOM <CODE>STAPLE_DUAL_BOTTOM</CODE>} * {@link #STAPLE_DUAL_BOTTOM STAPLE_DUAL_BOTTOM}
* </TD> * </TD>
* <TD WIDTH=9%> * <TD WIDTH=9%>
* &nbsp; * &nbsp;
@ -147,16 +147,16 @@ import javax.print.attribute.PrintJobAttribute;
* </TR> * </TR>
* </TABLE> * </TABLE>
* <P> * <P>
* The <CODE>STAPLE_<I>XXX</I></CODE> values are specified with respect to the * The STAPLE_<I>XXX</I> values are specified with respect to the
* document as if the document were a portrait document. If the document is * document as if the document were a portrait document. If the document is
* actually a landscape or a reverse-landscape document, the client supplies the * actually a landscape or a reverse-landscape document, the client supplies the
* appropriate transformed value. For example, to position a staple in the upper * appropriate transformed value. For example, to position a staple in the upper
* left hand corner of a landscape document when held for reading, the client * left hand corner of a landscape document when held for reading, the client
* supplies the <CODE>STAPLE_BOTTOM_LEFT</CODE> value (since landscape is * supplies the STAPLE_BOTTOM_LEFT value (since landscape is
* defined as a +90 degree rotation from portrait, i.e., anti-clockwise). On the * defined as a +90 degree rotation from portrait, i.e., anti-clockwise). On the
* other hand, to position a staple in the upper left hand corner of a * other hand, to position a staple in the upper left hand corner of a
* reverse-landscape document when held for reading, the client supplies the * reverse-landscape document when held for reading, the client supplies the
* <CODE>STAPLE_TOP_RIGHT</CODE> value (since reverse-landscape is defined as a * STAPLE_TOP_RIGHT value (since reverse-landscape is defined as a
* -90 degree rotation from portrait, i.e., clockwise). * -90 degree rotation from portrait, i.e., clockwise).
* <P> * <P>
* The angle (vertical, horizontal, angled) of each staple with respect to the * The angle (vertical, horizontal, angled) of each staple with respect to the

View File

@ -67,7 +67,7 @@ import javax.print.attribute.PrintJobAttribute;
* shown in the table below. * shown in the table below.
* <P> * <P>
* <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Table showing computation of doc sizes"> * <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Table showing computation of doc sizes">
* <TR BGCOLOR="#E5E5E5"> * <TR>
* <TH>Representation Class</TH> * <TH>Representation Class</TH>
* <TH>Document Size</TH> * <TH>Document Size</TH>
* </TR> * </TR>

View File

@ -62,7 +62,7 @@ import javax.print.attribute.PrintRequestAttribute;
* The (x,y) origin is positioned at the top-left of the paper in portrait * The (x,y) origin is positioned at the top-left of the paper in portrait
* mode regardless of the orientation specified in the requesting context. * mode regardless of the orientation specified in the requesting context.
* For example a printable area for A4 paper in portrait or landscape * For example a printable area for A4 paper in portrait or landscape
* orientation will have height > width. * orientation will have height {@literal >} width.
* <p> * <p>
* A printable area attribute's values are stored * A printable area attribute's values are stored
* internally as integers in units of micrometers (&#181;m), where 1 micrometer * internally as integers in units of micrometers (&#181;m), where 1 micrometer
@ -107,9 +107,9 @@ public final class MediaPrintableArea
* @param units in which the values are expressed. * @param units in which the values are expressed.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> < 0 * Thrown if {@code x < 0} or {@code y < 0}
* or <CODE>w</CODE> <= 0 or <CODE>h</CODE> <= 0 or * or {@code w <= 0} or {@code h <= 0} or
* <CODE>units</CODE> < 1. * {@code units < 1}.
*/ */
public MediaPrintableArea(float x, float y, float w, float h, int units) { public MediaPrintableArea(float x, float y, float w, float h, int units) {
if ((x < 0.0) || (y < 0.0) || (w <= 0.0) || (h <= 0.0) || if ((x < 0.0) || (y < 0.0) || (w <= 0.0) || (h <= 0.0) ||
@ -133,9 +133,9 @@ public final class MediaPrintableArea
* @param units in which the values are expressed. * @param units in which the values are expressed.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> < 0 * Thrown if {@code x < 0} or {@code y < 0}
* or <CODE>w</CODE> <= 0 or <CODE>h</CODE> <= 0 or * or {@code w <= 0} or {@code h <= 0} or
* <CODE>units</CODE> < 1. * {@code units < 1}.
*/ */
public MediaPrintableArea(int x, int y, int w, int h, int units) { public MediaPrintableArea(int x, int y, int w, int h, int units) {
if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) ||
@ -159,7 +159,7 @@ public final class MediaPrintableArea
* @return printable area as array of x, y, w, h in the specified units. * @return printable area as array of x, y, w, h in the specified units.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float[] getPrintableArea(int units) { public float[] getPrintableArea(int units) {
return new float[] { getX(units), getY(units), return new float[] { getX(units), getY(units),
@ -177,7 +177,7 @@ public final class MediaPrintableArea
* specified units. * specified units.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getX(int units) { public float getX(int units) {
return convertFromMicrometers(x, units); return convertFromMicrometers(x, units);
@ -194,7 +194,7 @@ public final class MediaPrintableArea
* specified units. * specified units.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getY(int units) { public float getY(int units) {
return convertFromMicrometers(y, units); return convertFromMicrometers(y, units);
@ -209,7 +209,7 @@ public final class MediaPrintableArea
* @return width of the printable area in the specified units. * @return width of the printable area in the specified units.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getWidth(int units) { public float getWidth(int units) {
return convertFromMicrometers(w, units); return convertFromMicrometers(w, units);
@ -224,7 +224,7 @@ public final class MediaPrintableArea
* @return height of the printable area in the specified units. * @return height of the printable area in the specified units.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public float getHeight(int units) { public float getHeight(int units) {
return convertFromMicrometers(h, units); return convertFromMicrometers(h, units);
@ -301,7 +301,7 @@ public final class MediaPrintableArea
* @return String version of this two-dimensional size attribute. * @return String version of this two-dimensional size attribute.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>units</CODE> < 1. * (unchecked exception) Thrown if {@code units < 1}.
*/ */
public String toString(int units, String unitsName) { public String toString(int units, String unitsName) {
if (unitsName == null) { if (unitsName == null) {

View File

@ -45,7 +45,7 @@ import javax.print.attribute.Attribute;
* <code>MediaSize.getMediaSizeForName(MediaSizeName)</code> * <code>MediaSize.getMediaSizeForName(MediaSizeName)</code>
* to find the physical dimensions of the MediaSizeName instances * to find the physical dimensions of the MediaSizeName instances
* enumerated in this API. This is useful for clients which need this * enumerated in this API. This is useful for clients which need this
* information to format & paginate printing. * information to format {@literal &} paginate printing.
* <P> * <P>
* *
* @author Phil Race, Alan Kaminsky * @author Phil Race, Alan Kaminsky
@ -71,8 +71,8 @@ public class MediaSize extends Size2DSyntax implements Attribute {
* <CODE>Size2DSyntax.MM</CODE>. * <CODE>Size2DSyntax.MM</CODE>.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* < 0 or <CODE>units</CODE> < 1 or <CODE>x</CODE> > <CODE>y</CODE>. * {@code units < 1} or {@code x > y}.
*/ */
public MediaSize(float x, float y,int units) { public MediaSize(float x, float y,int units) {
super (x, y, units); super (x, y, units);
@ -92,8 +92,8 @@ public class MediaSize extends Size2DSyntax implements Attribute {
* <CODE>Size2DSyntax.MM</CODE>. * <CODE>Size2DSyntax.MM</CODE>.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* < 0 or <CODE>units</CODE> < 1 or <CODE>x</CODE> > <CODE>y</CODE>. * {@code units < 1} or {@code x > y}.
*/ */
public MediaSize(int x, int y,int units) { public MediaSize(int x, int y,int units) {
super (x, y, units); super (x, y, units);
@ -115,8 +115,8 @@ public class MediaSize extends Size2DSyntax implements Attribute {
* @param media a media name to associate with this MediaSize * @param media a media name to associate with this MediaSize
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* < 0 or <CODE>units</CODE> < 1 or <CODE>x</CODE> > <CODE>y</CODE>. * {@code units < 1} or {@code x > y}.
*/ */
public MediaSize(float x, float y,int units, MediaSizeName media) { public MediaSize(float x, float y,int units, MediaSizeName media) {
super (x, y, units); super (x, y, units);
@ -141,8 +141,8 @@ public class MediaSize extends Size2DSyntax implements Attribute {
* @param media a media name to associate with this MediaSize * @param media a media name to associate with this MediaSize
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (Unchecked exception) Thrown if <CODE>x</CODE> < 0 or <CODE>y</CODE> * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* < 0 or <CODE>units</CODE> < 1 or <CODE>x</CODE> > <CODE>y</CODE>. * {@code units < 1} or {@code x > y}.
*/ */
public MediaSize(int x, int y,int units, MediaSizeName media) { public MediaSize(int x, int y,int units, MediaSizeName media) {
super (x, y, units); super (x, y, units);
@ -194,7 +194,8 @@ public class MediaSize extends Size2DSyntax implements Attribute {
* Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
* <CODE>Size2DSyntax.MM</CODE> * <CODE>Size2DSyntax.MM</CODE>
* @return MediaSizeName matching these dimensions, or null. * @return MediaSizeName matching these dimensions, or null.
* @exception IllegalArgumentException if x <= 0, y <= 0, or units < 1 * @exception IllegalArgumentException if {@code x <= 0},
* {@code y <= 0}, or {@code units < 1}.
* *
*/ */
public static MediaSizeName findMedia(float x, float y, int units) { public static MediaSizeName findMedia(float x, float y, int units) {

View File

@ -56,56 +56,56 @@ public final class PresentationDirection extends EnumSyntax
/** /**
* Pages are laid out in columns starting at the top left, * Pages are laid out in columns starting at the top left,
* proceeeding towards the bottom & right. * proceeeding towards the bottom {@literal &} right.
*/ */
public static final PresentationDirection TOBOTTOM_TORIGHT = public static final PresentationDirection TOBOTTOM_TORIGHT =
new PresentationDirection(0); new PresentationDirection(0);
/** /**
* Pages are laid out in columns starting at the top right, * Pages are laid out in columns starting at the top right,
* proceeeding towards the bottom & left. * proceeeding towards the bottom {@literal &} left.
*/ */
public static final PresentationDirection TOBOTTOM_TOLEFT = public static final PresentationDirection TOBOTTOM_TOLEFT =
new PresentationDirection(1); new PresentationDirection(1);
/** /**
* Pages are laid out in columns starting at the bottom left, * Pages are laid out in columns starting at the bottom left,
* proceeeding towards the top & right. * proceeeding towards the top {@literal &} right.
*/ */
public static final PresentationDirection TOTOP_TORIGHT = public static final PresentationDirection TOTOP_TORIGHT =
new PresentationDirection(2); new PresentationDirection(2);
/** /**
* Pages are laid out in columns starting at the bottom right, * Pages are laid out in columns starting at the bottom right,
* proceeeding towards the top & left. * proceeeding towards the top {@literal &} left.
*/ */
public static final PresentationDirection TOTOP_TOLEFT = public static final PresentationDirection TOTOP_TOLEFT =
new PresentationDirection(3); new PresentationDirection(3);
/** /**
* Pages are laid out in rows starting at the top left, * Pages are laid out in rows starting at the top left,
* proceeeding towards the right & bottom. * proceeeding towards the right {@literal &} bottom.
*/ */
public static final PresentationDirection TORIGHT_TOBOTTOM = public static final PresentationDirection TORIGHT_TOBOTTOM =
new PresentationDirection(4); new PresentationDirection(4);
/** /**
* Pages are laid out in rows starting at the bottom left, * Pages are laid out in rows starting at the bottom left,
* proceeeding towards the right & top. * proceeeding towards the right {@literal &} top.
*/ */
public static final PresentationDirection TORIGHT_TOTOP = public static final PresentationDirection TORIGHT_TOTOP =
new PresentationDirection(5); new PresentationDirection(5);
/** /**
* Pages are laid out in rows starting at the top right, * Pages are laid out in rows starting at the top right,
* proceeeding towards the left & bottom. * proceeeding towards the left {@literal &} bottom.
*/ */
public static final PresentationDirection TOLEFT_TOBOTTOM = public static final PresentationDirection TOLEFT_TOBOTTOM =
new PresentationDirection(6); new PresentationDirection(6);
/** /**
* Pages are laid out in rows starting at the bottom right, * Pages are laid out in rows starting at the bottom right,
* proceeeding towards the left & top. * proceeeding towards the left {@literal &} top.
*/ */
public static final PresentationDirection TOLEFT_TOTOP = public static final PresentationDirection TOLEFT_TOTOP =
new PresentationDirection(7); new PresentationDirection(7);

View File

@ -40,7 +40,7 @@ import javax.print.attribute.PrintServiceAttribute;
* details on color support). The information is intended to be germane to * details on color support). The information is intended to be germane to
* this kind of printer without regard to site specific modifications or * this kind of printer without regard to site specific modifications or
* services. * services.
* <P * <P>
* In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used * In contrast, the {@link PrinterMoreInfo PrinterMoreInfo} attribute is used
* to find out more information about this specific printer rather than this * to find out more information about this specific printer rather than this
* general kind of printer. * general kind of printer.

View File

@ -84,11 +84,11 @@ public final class PrinterResolution extends ResolutionSyntax
* Feed direction resolution. * Feed direction resolution.
* @param units * @param units
* Unit conversion factor, e.g. <code>ResolutionSyntax.DPI</CODE> * Unit conversion factor, e.g. <code>ResolutionSyntax.DPI</CODE>
* or <code>ResolutionSyntax.>DPCM</CODE>. * or <code>ResolutionSyntax.DPCM</CODE>.
* *
* @exception IllegalArgumentException * @exception IllegalArgumentException
* (unchecked exception) Thrown if <CODE>crossFeedResolution</CODE> < * (unchecked exception) Thrown if {@code crossFeedResolution < 1} or
* 1 or <CODE>feedResolution</CODE> < 1 or <CODE>units</CODE> < 1. * {@code feedResolution < 1} or {@code units < 1}.
*/ */
public PrinterResolution(int crossFeedResolution, int feedResolution, public PrinterResolution(int crossFeedResolution, int feedResolution,
int units) { int units) {