public class Book extends Object implements Pageable
Pageable,
PrinterJob
UNKNOWN_NUMBER_OF_PAGES| Constructor and Description |
|---|
Book()
创建一个新的、空的
Book。
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(Printable painter, PageFormat page)
添加一个单页本
Book结束。
|
void |
append(Printable painter, PageFormat page, int numPages)
追加
numPages页本
Book结束。
|
int |
getNumberOfPages()
在这
Book返回的页面数量。
|
PageFormat |
getPageFormat(int pageIndex)
返回指定的页面
PageFormat
pageIndex。
|
Printable |
getPrintable(int pageIndex)
返回指定的
pageIndex负责渲染页面的
Printable实例。
|
void |
setPage(int pageIndex, Printable painter, PageFormat page)
集
PageFormat和指定页码的
Painter。
|
public int getNumberOfPages()
Book返回的页面数量。
getNumberOfPages 接口
Pageable
Book包含的页数。
public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
PageFormat
pageIndex。
getPageFormat 接口
Pageable
pageIndex -基于零的索引页面被请求的
PageFormat
PageFormat。
IndexOutOfBoundsException -如果
Pageable不包含请求的页面
public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException
Printable负责绘制指定的
pageIndex页。
getPrintable 接口
Pageable
pageIndex -基于零的索引页面被请求的
Printable
Printable呈现页。
IndexOutOfBoundsException -如果
Pageable不包含请求的页面
public void setPage(int pageIndex,
Printable painter,
PageFormat page)
throws IndexOutOfBoundsException
PageFormat和指定页码的
Painter。
pageIndex -基于零的索引页的画家和格式的改变
painter -
Printable实例呈现页
page -页面的大小和方向
IndexOutOfBoundsException -如果指定的页面是不是已经在这
Book
NullPointerException -如果
painter或
page论点是
null
public void append(Printable painter, PageFormat page)
Book结束。
painter -
Printable实例呈现页
page -页面的大小和方向
NullPointerException -如果
painter或
page论点是
null
public void append(Printable painter, PageFormat page, int numPages)
numPages页本
Book结束。每个页面与
page。
painter -
Printable实例呈现页
page -页面的大小和方向
numPages -页数被添加到这个
Book。
NullPointerException -如果
painter或
page论点是
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.