Module jEdit

Class Margins

java.lang.Object
org.gjt.sp.jedit.print.Margins
All Implemented Interfaces:
Serializable, Attribute, DocAttribute, PrintJobAttribute, PrintRequestAttribute

public class Margins extends Object implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
Custom printing attribute to represent page margins.
See Also:
  • Constructor Details

    • Margins

      public Margins(float top, float left, float right, float bottom)
  • Method Details

    • getMargins

      public float[] getMargins(int units)
      Get the margins as an array of 4 values in the order top, left, right, bottom. The values returned are in the given units.
      Parameters:
      units - Unit conversion factor, either INCH or MM.
      Returns:
      margins as array of top, left, right, bottom in the specified units.
      Throws:
      IllegalArgumentException - on invalid units.
    • getTop

      public float getTop(int units)
    • getLeft

      public float getLeft(int units)
    • getRight

      public float getRight(int units)
    • getBottom

      public float getBottom(int units)
    • getCategory

      public final Class<? extends Attribute> getCategory()
      Specified by:
      getCategory in interface Attribute
    • getName

      public final String getName()
      Specified by:
      getName in interface Attribute
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(int units)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object