public class PrintJob
extends java.lang.Object
Constructor and Description |
---|
PrintJob(java.lang.String name,
Print document)
Constructs a PrintJob for the given document.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Print |
getDocument()
Returns the document to be printed.
|
Margins |
getMargins()
Returns the page margins, expressed in points.
|
java.lang.String |
getName()
Returns the name of the print job.
|
int |
getOrientation()
Returns the page orientation.
|
int |
hashCode() |
PrintJob |
setMargins(int margins)
Sets the top, left, right, and bottom margins to the argument.
|
PrintJob |
setMargins(Margins margins)
Sets the page margins.
|
PrintJob |
setOrientation(int orientation)
Sets the page orientation.
|
public PrintJob(java.lang.String name, Print document)
name
- the name of the print job, which will appear in the print
queue of the operating system.document
- the document to be printed.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getName()
public Print getDocument()
public int getOrientation()
public PrintJob setOrientation(int orientation)
orientation
- the page orientation. Must be one of
PaperClips.ORIENTATION_DEFAULT
,
PaperClips.ORIENTATION_PORTRAIT
or
PaperClips.ORIENTATION_LANDSCAPE
. Values other than
these choices will be automatically changed to
PaperClips.ORIENTATION_DEFAULT
.public Margins getMargins()
public PrintJob setMargins(Margins margins)
margins
- the new page margins.public PrintJob setMargins(int margins)
margins
- the margins, in points. 72 points = 1 inch.