Class PrintJob
java.lang.Object
org.eclipse.nebula.paperclips.core.PrintJob
public class PrintJob
extends java.lang.Object
Instances of this class represent a prepared print job.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)PrintgetDocument()Returns the document to be printed.MarginsgetMargins()Returns the page margins, expressed in points. 72 points = 1".java.lang.StringgetName()Returns the name of the print job.intgetOrientation()Returns the page orientation.inthashCode()PrintJobsetMargins(int margins)Sets the top, left, right, and bottom margins to the argument.PrintJobsetMargins(Margins margins)Sets the page margins.PrintJobsetOrientation(int orientation)Sets the page orientation.
-
Constructor Details
-
PrintJob
Constructs a PrintJob for the given document.- Parameters:
name- the name of the print job, which will appear in the print queue of the operating system.document- the document to be printed.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
getName
public java.lang.String getName()Returns the name of the print job.- Returns:
- the name of the print job.
-
getDocument
Returns the document to be printed.- Returns:
- the document to be printed.
-
getOrientation
public int getOrientation()Returns the page orientation.- Returns:
- the page orientation.
-
setOrientation
Sets the page orientation.- Parameters:
orientation- the page orientation. Must be one ofPaperClips.ORIENTATION_DEFAULT,PaperClips.ORIENTATION_PORTRAITorPaperClips.ORIENTATION_LANDSCAPE. Values other than these choices will be automatically changed toPaperClips.ORIENTATION_DEFAULT.- Returns:
- this PrintJob (for chaining method calls)
-
getMargins
Returns the page margins, expressed in points. 72 points = 1".- Returns:
- the page margins, expressed in points. 72 points = 1".
-
setMargins
Sets the page margins.- Parameters:
margins- the new page margins.- Returns:
- this PrintJob (for chaining method calls)
-
setMargins
Sets the top, left, right, and bottom margins to the argument.- Parameters:
margins- the margins, in points. 72 points = 1 inch.- Returns:
- this PrintJob (for chaining method calls)
-