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 | 查看方向键,用于通过旋转矩阵区分页面内容的方向。 |
方法
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” 页面尺寸值
SIZE_LEGAL
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:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | java.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:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long | |
| arg1 | int |