PageFormat class describes the size and
orientation of a page to be printed.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | LANDSCAPE
The origin is at the bottom left of the paper with x running bottom to top and y running left to right. |
| private int | mOrientation
The orientation of the current page. |
| private Paper | mPaper
A description of the physical piece of paper. |
| public static final int | PORTRAIT
The origin is at the top left of the paper with x running to the right and y running down the paper. |
| public static final int | REVERSE_LANDSCAPE
The origin is at the top right of the paper with x running top to bottom and y running right to left. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: a copy of thisPageFormat.Overrides java. Makes a copy of this |
| public double | |
| public double | Returns: the height of the page.Return the height, in 1/72nds of an inch, of the imageable area of the page. |
| public double | Returns: the width of the page.Returns the width, in 1/72nds of an inch, of the imageable area of the page. |
| public double | Returns: the x coordinate of the upper left point of the imageable area of thePaper object
associated with this PageFormat.Returns the x coordinate of the upper left point of the
imageable area of the |
| public double | Returns: the y coordinate of the upper left point of the imageable area of thePaper object
associated with this PageFormat.Returns the y coordinate of the upper left point of the
imageable area of the |
| public double[] | Returns: the matrix used to translate user space rendering to the orientation of the page.Returns a transformation matrix that translates user space rendering to the requested orientation of the page. |
| public int | Returns: thisPageFormat object's orientation.Returns the orientation of this |
| public Paper | |
| public double | |
| public void | |
| public void |
| LANDSCAPE | back to summary |
|---|---|
| public static final int LANDSCAPE The origin is at the bottom left of the paper with x running bottom to top and y running left to right. Note that this is not the Macintosh landscape but is the Window's and PostScript landscape. | |
| mOrientation | back to summary |
|---|---|
| private int mOrientation The orientation of the current page. This will be one of the constants: PORTRAIT, LANDSCAPE, or REVERSE_LANDSCAPE, | |
| mPaper | back to summary |
|---|---|
| private Paper mPaper A description of the physical piece of paper. | |
| PORTRAIT | back to summary |
|---|---|
| public static final int PORTRAIT The origin is at the top left of the paper with x running to the right and y running down the paper. | |
| REVERSE_LANDSCAPE | back to summary |
|---|---|
| public static final int REVERSE_LANDSCAPE The origin is at the top right of the paper with x running top to bottom and y running right to left. Note that this is the Macintosh landscape. | |
| PageFormat | back to summary |
|---|---|
| public PageFormat() Creates a default, portrait-oriented
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Makes a copy of this
| |
| getHeight | back to summary |
|---|---|
| public double getHeight() Returns the height, in 1/72nds of an inch, of the page. This method takes into account the orientation of the page when determining the height.
| |
| getImageableHeight | back to summary |
|---|---|
| public double getImageableHeight() Return the height, in 1/72nds of an inch, of the imageable area of the page. This method takes into account the orientation of the page.
| |
| getImageableWidth | back to summary |
|---|---|
| public double getImageableWidth() Returns the width, in 1/72nds of an inch, of the imageable area of the page. This method takes into account the orientation of the page.
| |
| getImageableX | back to summary |
|---|---|
| public double getImageableX() Returns the x coordinate of the upper left point of the
imageable area of the
| |
| getImageableY | back to summary |
|---|---|
| public double getImageableY() Returns the y coordinate of the upper left point of the
imageable area of the
| |
| getMatrix | back to summary |
|---|---|
| public double[] getMatrix() Returns a transformation matrix that translates user
space rendering to the requested orientation
of the page. The values are placed into the
array as
{ m00, m10, m01, m11, m02, m12} in
the form required by the
| |
| getOrientation | back to summary |
|---|---|
| public int getOrientation() Returns the orientation of this
| |
| getPaper | back to summary |
|---|---|
| public Paper getPaper() Returns a copy of the | |
| getWidth | back to summary |
|---|---|
| public double getWidth() Returns the width, in 1/72nds of an inch, of the page. This method takes into account the orientation of the page when determining the width.
| |
| setOrientation | back to summary |
|---|---|
| public void setOrientation(int orientation) throws IllegalArgumentException Sets the page orientation.
| |
| setPaper | back to summary |
|---|---|
| public void setPaper(Paper paper) Sets the
| |