java.lang.Object
org.eclipse.nebula.paperclips.core.Margins
public class Margins
extends java.lang.Object
Instances of this class represent the page margins to follow when processing
a print job.
Field Summary
Fields
Modifier and Type
Field
Description
int
bottom
The bottom margin.
int
left
The left margin.
int
right
The right margin.
int
top
The top margin.
Constructor Summary
Constructors
Constructor
Description
Margins ()
Constructs a Margins with all sides set to 1" margins.
Margins (int margins)
Constructs a Margins with all sides set to the argument.
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method
Description
boolean
equals (java.lang.Object obj)
int
hashCode ()
Margins
rotate ()
Returns a Margins that is the result of rotating this Margins
counter-clockwise 90 degrees.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Field Details
public int top
The top margin.
public int left
The left margin.
public int right
The right margin.
public int bottom
The bottom margin.
Constructor Details
public Margins ()
Constructs a Margins with all sides set to 1" margins.
public Margins (int margins)
Constructs a Margins with all sides set to the argument.
Parameters:
margins
- the page margins, expressed in points. 72 points = 1".
Method Details
Returns a Margins that is the result of rotating this Margins
counter-clockwise 90 degrees. A job which is rotated 90 degrees (e.g. for
landscape printing) needs to have its margins rotated to match. This is a
convenience method for that purpose.
Returns:
a Margins that is the result of rotating this Margins
counter-clockwise 90 degrees.
public int hashCode ()
Overrides:
hashCode
in class java.lang.Object
public boolean equals (java.lang.Object obj)
Overrides:
equals
in class java.lang.Object