< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java

Print this page

        

*** 40,50 **** * 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> * 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 --- 40,50 ---- * 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)} * 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,75 **** * 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>. * * @exception IllegalArgumentException * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or * {@code units < 1} or {@code x > y}. */ --- 64,75 ---- * values. * * @param x X dimension. * @param y Y dimension. * @param units ! * 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,96 **** * 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>. * * @exception IllegalArgumentException * (Unchecked exception) Thrown if {@code x < 0} or {@code y < 0} or * {@code units < 1} or {@code x > y}. */ --- 85,96 ---- * 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} 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,118 **** * 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>. * @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}. --- 107,118 ---- * values. * * @param x X dimension. * @param y Y dimension. * @param units ! * 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,144 **** * 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>. * @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,144 ---- * 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} 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,199 **** * 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> * @return MediaSizeName matching these dimensions, or null. * @exception IllegalArgumentException if {@code x <= 0}, * {@code y <= 0}, or {@code units < 1}. * */ --- 188,199 ---- * 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} 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,258 **** * 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. * <LI> ! * <CODE>object</CODE> is an instance of class MediaSize. * <LI> * This media size attribute's X dimension is equal to ! * <CODE>object</CODE>'s X dimension. * <LI> * This media size attribute's Y dimension is equal to ! * <CODE>object</CODE>'s Y dimension. * </OL> * * @param object Object to compare to. * ! * @return True if <CODE>object</CODE> is equivalent to this media size * attribute, false otherwise. */ public boolean equals(Object object) { return (super.equals(object) && object instanceof MediaSize); } --- 235,258 ---- * 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} is not null. * <LI> ! * {@code object} is an instance of class MediaSize. * <LI> * This media size attribute's X dimension is equal to ! * {@code object}'s X dimension. * <LI> * This media size attribute's Y dimension is equal to ! * {@code object}'s Y dimension. * </OL> * * @param object Object to compare to. * ! * @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,284 **** /** * 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>. * * @return Attribute category name. */ public final String getName() { return "media-size"; --- 274,284 ---- /** * 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"}. * * @return Attribute category name. */ public final String getName() { return "media-size";
< prev index next >