< prev index next >

src/java.desktop/share/classes/java/awt/print/PageFormat.java

Print this page

        

*** 30,40 **** import java.awt.geom.Rectangle2D; import java.lang.annotation.Native; /** ! * The <code>PageFormat</code> class describes the size and * orientation of a page to be printed. */ public class PageFormat implements Cloneable { --- 30,40 ---- import java.awt.geom.Rectangle2D; import java.lang.annotation.Native; /** ! * The {@code PageFormat} class describes the size and * orientation of a page to be printed. */ public class PageFormat implements Cloneable {
*** 78,100 **** /* Constructors */ /** * Creates a default, portrait-oriented ! * <code>PageFormat</code>. */ public PageFormat() { mPaper = new Paper(); } /* Instance Methods */ /** ! * Makes a copy of this <code>PageFormat</code> with the same ! * contents as this <code>PageFormat</code>. ! * @return a copy of this <code>PageFormat</code>. */ public Object clone() { PageFormat newPage; try { --- 78,100 ---- /* Constructors */ /** * Creates a default, portrait-oriented ! * {@code PageFormat}. */ public PageFormat() { mPaper = new Paper(); } /* Instance Methods */ /** ! * Makes a copy of this {@code PageFormat} with the same ! * contents as this {@code PageFormat}. ! * @return a copy of this {@code PageFormat}. */ public Object clone() { PageFormat newPage; try {
*** 148,164 **** return height; } /** * Returns the x coordinate of the upper left point of the ! * imageable area of the <code>Paper</code> object ! * associated with this <code>PageFormat</code>. * This method takes into account the * orientation of the page. * @return the x coordinate of the upper left point of the ! * imageable area of the <code>Paper</code> object ! * associated with this <code>PageFormat</code>. */ public double getImageableX() { double x; switch (getOrientation()) { --- 148,164 ---- return height; } /** * Returns the x coordinate of the upper left point of the ! * imageable area of the {@code Paper} object ! * associated with this {@code PageFormat}. * This method takes into account the * orientation of the page. * @return the x coordinate of the upper left point of the ! * imageable area of the {@code Paper} object ! * associated with this {@code PageFormat}. */ public double getImageableX() { double x; switch (getOrientation()) {
*** 187,203 **** return x; } /** * Returns the y coordinate of the upper left point of the ! * imageable area of the <code>Paper</code> object ! * associated with this <code>PageFormat</code>. * This method takes into account the * orientation of the page. * @return the y coordinate of the upper left point of the ! * imageable area of the <code>Paper</code> object ! * associated with this <code>PageFormat</code>. */ public double getImageableY() { double y; switch (getOrientation()) { --- 187,203 ---- return x; } /** * Returns the y coordinate of the upper left point of the ! * imageable area of the {@code Paper} object ! * associated with this {@code PageFormat}. * This method takes into account the * orientation of the page. * @return the y coordinate of the upper left point of the ! * imageable area of the {@code Paper} object ! * associated with this {@code PageFormat}. */ public double getImageableY() { double y; switch (getOrientation()) {
*** 263,303 **** } /** * Returns a copy of the {@link Paper} object associated ! * with this <code>PageFormat</code>. Changes made to the ! * <code>Paper</code> object returned from this method do not ! * affect the <code>Paper</code> object of this ! * <code>PageFormat</code>. To update the <code>Paper</code> ! * object of this <code>PageFormat</code>, create a new ! * <code>Paper</code> object and set it into this ! * <code>PageFormat</code> by using the {@link #setPaper(Paper)} * method. ! * @return a copy of the <code>Paper</code> object associated ! * with this <code>PageFormat</code>. * @see #setPaper */ public Paper getPaper() { return (Paper)mPaper.clone(); } /** ! * Sets the <code>Paper</code> object for this ! * <code>PageFormat</code>. ! * @param paper the <code>Paper</code> object to which to set ! * the <code>Paper</code> object for this <code>PageFormat</code>. * @exception NullPointerException * a null paper instance was passed as a parameter. * @see #getPaper */ public void setPaper(Paper paper) { mPaper = (Paper)paper.clone(); } /** ! * Sets the page orientation. <code>orientation</code> must be * one of the constants: PORTRAIT, LANDSCAPE, * or REVERSE_LANDSCAPE. * @param orientation the new orientation for the page * @throws IllegalArgumentException if * an unknown orientation was requested --- 263,303 ---- } /** * Returns a copy of the {@link Paper} object associated ! * with this {@code PageFormat}. Changes made to the ! * {@code Paper} object returned from this method do not ! * affect the {@code Paper} object of this ! * {@code PageFormat}. To update the {@code Paper} ! * object of this {@code PageFormat}, create a new ! * {@code Paper} object and set it into this ! * {@code PageFormat} by using the {@link #setPaper(Paper)} * method. ! * @return a copy of the {@code Paper} object associated ! * with this {@code PageFormat}. * @see #setPaper */ public Paper getPaper() { return (Paper)mPaper.clone(); } /** ! * Sets the {@code Paper} object for this ! * {@code PageFormat}. ! * @param paper the {@code Paper} object to which to set ! * the {@code Paper} object for this {@code PageFormat}. * @exception NullPointerException * a null paper instance was passed as a parameter. * @see #getPaper */ public void setPaper(Paper paper) { mPaper = (Paper)paper.clone(); } /** ! * Sets the page orientation. {@code orientation} must be * one of the constants: PORTRAIT, LANDSCAPE, * or REVERSE_LANDSCAPE. * @param orientation the new orientation for the page * @throws IllegalArgumentException if * an unknown orientation was requested
*** 311,322 **** throw new IllegalArgumentException(); } } /** ! * Returns the orientation of this <code>PageFormat</code>. ! * @return this <code>PageFormat</code> object's orientation. * @see #setOrientation */ public int getOrientation() { return mOrientation; } --- 311,322 ---- throw new IllegalArgumentException(); } } /** ! * Returns the orientation of this {@code PageFormat}. ! * @return this {@code PageFormat} object's orientation. * @see #setOrientation */ public int getOrientation() { return mOrientation; }
< prev index next >