PageConstants

Inheritance: java.lang.Object

public class PageConstants

此类定义了一组描述页面的常量。提供了用于各种边距、方向、重新缩放和标准页面尺寸的便利对象。

字段

字段描述
BACKGROUND背景键
BACKGROUND_COLOR背景颜色键
FIT_TO_PAGE适配内容到页面键
MARGINS_LARGE"Large" 页面边距值
MARGINS_MEDIUM"Medium" 页面边距值
MARGINS_SMALL"Small" 页面边距值
MARGINS_ZERO"Zero" 页面边距值
ORIENTATION方向键,用于页面的命名方向,Portrait 或 Landscape。
ORIENTATION_BEST_FIT"Best fit" 方向值
ORIENTATION_LANDSCAPE"Landscape" 方向值
ORIENTATION_PORTRAIT"Portrait" 方向值
PAGE_MARGINS页面边距键
PAGE_SIZE页面尺寸键
SIZE_A3“A3” 页面尺寸值
SIZE_A4“A4” 页面尺寸值
SIZE_A5“A5” 页面尺寸值
SIZE_A6“A6” 页面尺寸值
SIZE_EXECUTIVE“Executive” 页面尺寸值
SIZE_INTERNATIONAL“International” 页面尺寸值
SIZE_LEDGER“Ledger” 页面尺寸值
SIZE_LEGAL“Legal” 页面尺寸值
SIZE_LETTER“Letter” 页面尺寸值
TRANSPARENT透明背景键
VIEWING_ORIENTATION查看方向键,用于通过旋转矩阵区分页面内容的方向。

方法

方法描述
equals(Object arg0)
getClass()
getMargins(Insets insets, String orientation)在指定方向下计算页面边距
getMargins(String size)
getOrientationList()
getSize(Dimension size, String orientation)计算给定页面方向的页面尺寸
getSize(String size)在 “Portrait” 页面方向下计算页面尺寸
getSize(String size, String orientation)计算给定页面方向的页面尺寸
getSizeList()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

BACKGROUND

public static final String BACKGROUND

背景键

BACKGROUND_COLOR

public static final String BACKGROUND_COLOR

背景颜色键

FIT_TO_PAGE

public static final String FIT_TO_PAGE

适配内容到页面键

MARGINS_LARGE

public static final String MARGINS_LARGE

"Large" 页面边距值

MARGINS_MEDIUM

public static final String MARGINS_MEDIUM

"Medium" 页面边距值

MARGINS_SMALL

public static final String MARGINS_SMALL

"Small" 页面边距值

MARGINS_ZERO

public static final String MARGINS_ZERO

"Zero" 页面边距值

ORIENTATION

public static final String ORIENTATION

方向键,用于页面的命名方向,Portrait 或 Landscape。

ORIENTATION_BEST_FIT

public static final String ORIENTATION_BEST_FIT

"Best fit" 方向值

ORIENTATION_LANDSCAPE

public static final String ORIENTATION_LANDSCAPE

"Landscape" 方向值

ORIENTATION_PORTRAIT

public static final String ORIENTATION_PORTRAIT

"Portrait" 方向值

PAGE_MARGINS

public static final String PAGE_MARGINS

页面边距键

PAGE_SIZE

public static final String PAGE_SIZE

页面尺寸键

SIZE_A3

public static final String SIZE_A3

“A3” 页面尺寸值

SIZE_A4

public static final String SIZE_A4

“A4” 页面尺寸值

SIZE_A5

public static final String SIZE_A5

“A5” 页面尺寸值

SIZE_A6

public static final String SIZE_A6

“A6” 页面尺寸值

SIZE_EXECUTIVE

public static final String SIZE_EXECUTIVE

“Executive” 页面尺寸值

SIZE_INTERNATIONAL

public static final String SIZE_INTERNATIONAL

“International” 页面尺寸值

SIZE_LEDGER

public static final String SIZE_LEDGER

“Ledger” 页面尺寸值

public static final String SIZE_LEGAL

“Legal” 页面尺寸值

SIZE_LETTER

public static final String SIZE_LETTER

“Letter” 页面尺寸值

TRANSPARENT

public static final String TRANSPARENT

透明背景键

VIEWING_ORIENTATION

public static final String VIEWING_ORIENTATION

查看方向键,用于通过旋转矩阵区分页面内容的方向。默认的查看方向矩阵是单位矩阵。

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

参数类型描述
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)

在指定方向下计算页面边距

Parameters:

参数类型描述
内边距java.awt.Insets原始边距
方向java.lang.String页面方向

Returns: java.awt.Insets - 给定方向的预定义页面边距

getMargins(String size)

public static final Insets getMargins(String size)

Parameters:

参数类型描述
大小java.lang.String预定义页面尺寸

Returns: java.awt.Insets - 预定义页面边距

getOrientationList()

public static final String[] getOrientationList()

Returns: java.lang.String[] - 可用方向值

getSize(Dimension size, String orientation)

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

计算给定页面方向的页面尺寸

Parameters:

参数类型描述
大小java.awt.Dimension原始页面尺寸
方向java.lang.String页面方向

Returns: java.awt.Dimension - 计算的页面尺寸

getSize(String size)

public static final Dimension getSize(String size)

在 “Portrait” 页面方向下计算页面尺寸

Parameters:

参数类型描述
大小java.lang.String预定义页面尺寸

Returns: java.awt.Dimension - 计算的页面尺寸

getSize(String size, String orientation)

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

计算给定页面方向的页面尺寸

Parameters:

参数类型描述
大小java.lang.String预定义页面尺寸
方向java.lang.String页面方向

Returns: java.awt.Dimension - 计算的页面尺寸

getSizeList()

public static final String[] getSizeList()

Returns: java.lang.String[] - 可用的页面尺寸值

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:

参数类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

参数类型描述
arg0long
arg1int