java.lang.Object | |
↳ | java.awt.print.PageFormat |
The PageFormat
class describes the size and
orientation of a page to be printed.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | LANDSCAPE | The origin is at the bottom left of the paper with x running bottom to top and y running left to right. | |||||||||
int | PORTRAIT | The origin is at the top left of the paper with x running to the right and y running down the paper. | |||||||||
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. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a default, portrait-oriented
PageFormat . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Makes a copy of this
PageFormat with the same
contents as this PageFormat . | |||||||||||
Returns the height, in 1/72nds of an inch, of the page.
| |||||||||||
Return the height, in 1/72nds of an inch, of the imageable
area of the page.
| |||||||||||
Returns the width, in 1/72nds of an inch, of the imageable
area of the page.
| |||||||||||
Returns the x coordinate of the upper left point of the
imageable area of the
Paper object
associated with this PageFormat . | |||||||||||
Returns the y coordinate of the upper left point of the
imageable area of the
Paper object
associated with this PageFormat . | |||||||||||
Returns a transformation matrix that translates user
space rendering to the requested orientation
of the page.
| |||||||||||
Returns the orientation of this
PageFormat . | |||||||||||
Returns a copy of the
Paper object associated
with this PageFormat . | |||||||||||
Returns the width, in 1/72nds of an inch, of the page.
| |||||||||||
Sets the page orientation.
| |||||||||||
Sets the
Paper object for this
PageFormat . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
The origin is at the top left of the paper with x running to the right and y running down the paper.
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.
Creates a default, portrait-oriented
PageFormat
.
Makes a copy of this PageFormat
with the same
contents as this PageFormat
.
PageFormat
.
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.
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.
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.
Returns the x coordinate of the upper left point of the
imageable area of the Paper
object
associated with this PageFormat
.
This method takes into account the
orientation of the page.
Paper
object
associated with this PageFormat
.
Returns the y coordinate of the upper left point of the
imageable area of the Paper
object
associated with this PageFormat
.
This method takes into account the
orientation of the page.
Paper
object
associated with this PageFormat
.
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 AffineTransform
constructor.
Returns the orientation of this PageFormat
.
PageFormat
object's orientation.Returns a copy of the Paper
object associated
with this PageFormat
. Changes made to the
Paper
object returned from this method do not
affect the Paper
object of this
PageFormat
. To update the Paper
object of this PageFormat
, create a new
Paper
object and set it into this
PageFormat
by using the setPaper(Paper)
method.
Paper
object associated
with this PageFormat
.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.
Sets the page orientation. orientation
must be
one of the constants: PORTRAIT, LANDSCAPE,
or REVERSE_LANDSCAPE.
orientation | the new orientation for the page |
---|
IllegalArgumentException | if an unknown orientation was requested |
---|
Sets the Paper
object for this
PageFormat
.
paper | the Paper object to which to set
the Paper object for this PageFormat . |
---|
a null paper instance was passed as a parameter. |