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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatgetBottom(int units) floatgetLeft(int units) float[]getMargins(int units) Get the margins as an array of 4 values in the order top, left, right, bottom.final StringgetName()floatgetRight(int units) floatgetTop(int units) inthashCode()toString()toString(int units)
-
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
- Specified by:
getCategoryin interfaceAttribute
-
getName
-
toString
-
toString
-
equals
-
hashCode
public int hashCode()
-