Class Margins

java.lang.Object
net.sf.paperclips.Margins

public class Margins extends 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
    The bottom margin.
    int
    The left margin.
    int
    The right margin.
    int
    The top margin.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    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

    • top

      public int top
      The top margin.
    • left

      public int left
      The left margin.
    • bottom

      public int bottom
      The bottom margin.
  • Constructor Details

    • Margins

      public Margins()
      Constructs a Margins with all sides set to 1" margins.
    • 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

    • rotate

      public Margins rotate()
      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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object