< prev index next >
src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java
Print this page
@@ -40,11 +40,11 @@
* engineering, and other media.
* <P>
* MediaSize is not yet used to specify media. Its current role is
* as a mapping for named media (see {@link MediaSizeName MediaSizeName}).
* Clients can use the mapping method
- * <code>MediaSize.getMediaSizeForName(MediaSizeName)</code>
+ * {@code MediaSize.getMediaSizeForName(MediaSizeName)}
* to find the physical dimensions of the MediaSizeName instances
* enumerated in this API. This is useful for clients which need this
* information to format {@literal &} paginate printing.
*
* @author Phil Race, Alan Kaminsky
@@ -64,12 +64,12 @@
* values.
*
* @param x X dimension.
* @param y Y dimension.
* @param units
- * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
- * <CODE>Size2DSyntax.MM</CODE>.
+ * Unit conversion factor, e.g. {@code Size2DSyntax.INCH} or
+ * {@code Size2DSyntax.MM}.
*
* @exception IllegalArgumentException
* (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* {@code units < 1} or {@code x > y}.
*/
@@ -85,12 +85,12 @@
* Construct a new media size attribute from the given integer values.
*
* @param x X dimension.
* @param y Y dimension.
* @param units
- * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
- * <CODE>Size2DSyntax.MM</CODE>.
+ * Unit conversion factor, e.g. {@code Size2DSyntax.INCH} or
+ * {@code Size2DSyntax.MM}.
*
* @exception IllegalArgumentException
* (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* {@code units < 1} or {@code x > y}.
*/
@@ -107,12 +107,12 @@
* values.
*
* @param x X dimension.
* @param y Y dimension.
* @param units
- * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
- * <CODE>Size2DSyntax.MM</CODE>.
+ * Unit conversion factor, e.g. {@code Size2DSyntax.INCH} or
+ * {@code Size2DSyntax.MM}.
* @param media a media name to associate with this MediaSize
*
* @exception IllegalArgumentException
* (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* {@code units < 1} or {@code x > y}.
@@ -133,12 +133,12 @@
* Construct a new media size attribute from the given integer values.
*
* @param x X dimension.
* @param y Y dimension.
* @param units
- * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
- * <CODE>Size2DSyntax.MM</CODE>.
+ * Unit conversion factor, e.g. {@code Size2DSyntax.INCH} or
+ * {@code Size2DSyntax.MM}.
* @param media a media name to associate with this MediaSize
*
* @exception IllegalArgumentException
* (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or
* {@code units < 1} or {@code x > y}.
@@ -188,12 +188,12 @@
* This method is useful for clients which have only dimensions and
* want to find a Media which corresponds to the dimensions.
* @param x - X dimension
* @param y - Y dimension.
* @param units
- * Unit conversion factor, e.g. <CODE>Size2DSyntax.INCH</CODE> or
- * <CODE>Size2DSyntax.MM</CODE>
+ * Unit conversion factor, e.g. {@code Size2DSyntax.INCH} or
+ * {@code Size2DSyntax.MM}
* @return MediaSizeName matching these dimensions, or null.
* @exception IllegalArgumentException if {@code x <= 0},
* {@code y <= 0}, or {@code units < 1}.
*
*/
@@ -235,24 +235,24 @@
* Returns whether this media size attribute is equivalent to the passed
* in object.
* To be equivalent, all of the following conditions must be true:
* <OL TYPE=1>
* <LI>
- * <CODE>object</CODE> is not null.
+ * {@code object} is not null.
* <LI>
- * <CODE>object</CODE> is an instance of class MediaSize.
+ * {@code object} is an instance of class MediaSize.
* <LI>
* This media size attribute's X dimension is equal to
- * <CODE>object</CODE>'s X dimension.
+ * {@code object}'s X dimension.
* <LI>
* This media size attribute's Y dimension is equal to
- * <CODE>object</CODE>'s Y dimension.
+ * {@code object}'s Y dimension.
* </OL>
*
* @param object Object to compare to.
*
- * @return True if <CODE>object</CODE> is equivalent to this media size
+ * @return True if {@code object} is equivalent to this media size
* attribute, false otherwise.
*/
public boolean equals(Object object) {
return (super.equals(object) && object instanceof MediaSize);
}
@@ -274,11 +274,11 @@
/**
* Get the name of the category of which this attribute value is an
* instance.
* <P>
* For class MediaSize and any vendor-defined subclasses, the category
- * name is <CODE>"media-size"</CODE>.
+ * name is {@code "media-size"}.
*
* @return Attribute category name.
*/
public final String getName() {
return "media-size";
< prev index next >