public class PaperSize extends Boxed
Usage is straight forward:
paper = PaperSize.A4; width = paper.getWidth(Unit.MM); height = paper.getHeight(Unit.MM);
The √2 relationships between the various ISO sizes are shown in the following diagram (the imperialist paper sizes are included for comparison):
Constants for the two common page sizes are here. If you need one of the
more obscure cases, see subclasses InternationalPaperSize
or
NorthAmericanPaperSize
.
Modifier and Type | Field and Description |
---|---|
static PaperSize |
A4
Standard sheet size in use worldwide.
|
static PaperSize |
LETTER
Standard sheet size used in North America.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static PaperSize |
getDefault()
Returns the PaperSize corresponding to the default in effect for the
current locale.
|
String |
getDisplayName() |
double |
getHeight(Unit in)
Get the height of a piece of paper in the specified units.
|
double |
getWidth(Unit in)
Get the width of a piece of paper in the specified units.
|
String |
toString() |
public static final PaperSize A4
InternationalPaperSize
for other ISO paper
size constants.public static final PaperSize LETTER
NorthAmericanPaperSize
for other imperialist
paper sizes.public boolean equals(Object obj)
equals
in class Object
public static PaperSize getDefault()
public String getDisplayName()
public double getHeight(Unit in)
public double getWidth(Unit in)
w = paper.getWidth(Unit.MM);or
w = paper.getWidth(Unit.POINTS);depending on your need.
public String toString()
toString
in class org.freedesktop.bindings.Pointer