PageConstants

Inheritance: java.lang.Object

public class PageConstants

This class defines a set of constants which describe a page. Convenience objects are provided for various margins, orientations, rescaling, and standard page sizes.

Fields

FieldDescription
BACKGROUNDBackground key
BACKGROUND_COLORBackground color key
FIT_TO_PAGEFit content to page key
MARGINS_LARGE“Large” page margins value
MARGINS_MEDIUM“Medium” page margins value
MARGINS_SMALL“Small” page margins value
MARGINS_ZERO“Zero” page margins value
ORIENTATIONOrientation key, for the named orienation of page, Portret or Landscape.
ORIENTATION_BEST_FIT“Best fit” orientation value
ORIENTATION_LANDSCAPE“Landscape” orientation value
ORIENTATION_PORTRAIT“Portrait” orientation value
PAGE_MARGINSPage margins key
PAGE_SIZEPage size key
SIZE_A3“A3” page size value
SIZE_A4“A4” page size value
SIZE_A5“A5” page size value
SIZE_A6“A6” page size value
SIZE_EXECUTIVE“Executive” page size value
SIZE_INTERNATIONAL“International” page size value
SIZE_LEDGER“Ledger” page size value
SIZE_LEGAL“Legal” page size value
SIZE_LETTER“Letter” page size value
TRANSPARENTTransparent background key
VIEWING_ORIENTATIONViewing orientation key, for rotation matrix distinguishing orientation of content on the page.

Methods

MethodDescription
equals(Object arg0)
getClass()
getMargins(Insets insets, String orientation)Calculate page margins in specified orientation
getMargins(String size)
getOrientationList()
getSize(Dimension size, String orientation)Calculates page size in given page orientation
getSize(String size)Calculates page size in “Portrait” page orientation
getSize(String size, String orientation)Calculates page size in given page orientation
getSizeList()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

BACKGROUND

public static final String BACKGROUND

Background key

BACKGROUND_COLOR

public static final String BACKGROUND_COLOR

Background color key

FIT_TO_PAGE

public static final String FIT_TO_PAGE

Fit content to page key

MARGINS_LARGE

public static final String MARGINS_LARGE

“Large” page margins value

MARGINS_MEDIUM

public static final String MARGINS_MEDIUM

“Medium” page margins value

MARGINS_SMALL

public static final String MARGINS_SMALL

“Small” page margins value

MARGINS_ZERO

public static final String MARGINS_ZERO

“Zero” page margins value

ORIENTATION

public static final String ORIENTATION

Orientation key, for the named orienation of page, Portret or Landscape.

ORIENTATION_BEST_FIT

public static final String ORIENTATION_BEST_FIT

“Best fit” orientation value

ORIENTATION_LANDSCAPE

public static final String ORIENTATION_LANDSCAPE

“Landscape” orientation value

ORIENTATION_PORTRAIT

public static final String ORIENTATION_PORTRAIT

“Portrait” orientation value

PAGE_MARGINS

public static final String PAGE_MARGINS

Page margins key

PAGE_SIZE

public static final String PAGE_SIZE

Page size key

SIZE_A3

public static final String SIZE_A3

“A3” page size value

SIZE_A4

public static final String SIZE_A4

“A4” page size value

SIZE_A5

public static final String SIZE_A5

“A5” page size value

SIZE_A6

public static final String SIZE_A6

“A6” page size value

SIZE_EXECUTIVE

public static final String SIZE_EXECUTIVE

“Executive” page size value

SIZE_INTERNATIONAL

public static final String SIZE_INTERNATIONAL

“International” page size value

SIZE_LEDGER

public static final String SIZE_LEDGER

“Ledger” page size value

public static final String SIZE_LEGAL

“Legal” page size value

SIZE_LETTER

public static final String SIZE_LETTER

“Letter” page size value

TRANSPARENT

public static final String TRANSPARENT

Transparent background key

VIEWING_ORIENTATION

public static final String VIEWING_ORIENTATION

Viewing orientation key, for rotation matrix distinguishing orientation of content on the page. The default viewing orientation matrix is identity.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getMargins(Insets insets, String orientation)

public static final Insets getMargins(Insets insets, String orientation)

Calculate page margins in specified orientation

Parameters:

ParameterTypeDescription
insetsjava.awt.InsetsOriginal margins
orientationjava.lang.StringThe page orientation

Returns: java.awt.Insets - predefined page margins for given orientation

getMargins(String size)

public static final Insets getMargins(String size)

Parameters:

ParameterTypeDescription
sizejava.lang.Stringpredefined page size

Returns: java.awt.Insets - predefined page margins

getOrientationList()

public static final String[] getOrientationList()

Returns: java.lang.String[] - available orientation values

getSize(Dimension size, String orientation)

public static final Dimension getSize(Dimension size, String orientation)

Calculates page size in given page orientation

Parameters:

ParameterTypeDescription
sizejava.awt.DimensionOriginal page size
orientationjava.lang.StringThe page orientation

Returns: java.awt.Dimension - calculated page size

getSize(String size)

public static final Dimension getSize(String size)

Calculates page size in “Portrait” page orientation

Parameters:

ParameterTypeDescription
sizejava.lang.Stringpredefined page size

Returns: java.awt.Dimension - calculated page size

getSize(String size, String orientation)

public static final Dimension getSize(String size, String orientation)

Calculates page size in given page orientation

Parameters:

ParameterTypeDescription
sizejava.lang.Stringpredefined page size
orientationjava.lang.Stringthe page orientation

Returns: java.awt.Dimension - calculated page size

getSizeList()

public static final String[] getSizeList()

Returns: java.lang.String[] - available page size values

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int