java命名空间java.awt.print接口printable的类成员方法:
no_such_page定义及介绍
本文导语:
no_such_page
static final int no_such_page
从 print 返回,表示 pageindex 太大以及请求的页面不存在。
另请参见:常量字段值
print
int print(graphics graphics,
pageformat pageformat,
int pageindex)
throws printerexception
将指...
static final int no_such_page
- 从
print 返回,表示 pageindex 太大以及请求的页面不存在。
- 另请参见:
- 常量字段值
print
int print(graphics graphics,
pageformat pageformat,
int pageindex)
throws printerexception
- 将指定索引处的页面用指定格式打印到指定的
graphics 上下文。printerjob 调用 printable 接口,以请求将页面呈现到 graphics 指定的上下文。pageformat 指定要绘制的页面格式。pageindex 指定请求页面从 0 开始的索引。如果请求的页面不存在,那么此方法将返回 no_such_page;否则返回 page_exists。graphics 类或子类实现 printergraphics 接口,以提供附加信息。如果 printable 对象中止该打印作业,那么它将抛出 printerexception。
- 参数:
graphics - 用来绘制页面的上下文pageformat - 将绘制的页面的大小和方向pageindex - 要绘制的页面从 0 开始的索引
- 返回:
- 如果成功呈现该页面,则返回 page_exists;如果
pageindex 指定不存在的页面,则返回 no_such_page。
- 抛出:
printerexception - 打印作业被终止时抛出。