|
java-gnome version 4.0.15 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
Objectorg.freedesktop.bindings.Pointer
org.gnome.glib.Boxed
org.gnome.gtk.PaperSize
public class PaperSize
Representations of different sizes of paper used in printing operations.
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.
| Field Summary | |
|---|---|
static PaperSize |
A4
Standard sheet size in use worldwide. |
static PaperSize |
LETTER
Standard sheet size used in North America. |
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PaperSize A4
InternationalPaperSize for other ISO paper
size constants.
public static final PaperSize LETTER
NorthAmericanPaperSize for other imperialist
paper sizes.
| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectpublic 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
|
![]() java-gnome |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||