| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.awt.print.Book
public class Book
Book 类提供文档的表示形式,该文档的页面可以使用不同的页面格式和页面 painter。此类使用 Pageable 接口与 PrinterJob 交互。
Pageable, 
PrinterJob| 字段摘要 | 
|---|
| 从接口 java.awt.print.Pageable 继承的字段 | 
|---|
| UNKNOWN_NUMBER_OF_PAGES | 
| 构造方法摘要 | |
|---|---|
| Book()创建新的空 Book。 | |
| 方法摘要 | |
|---|---|
|  void | append(Printable painter,
       PageFormat page)将单个页面追加到此 Book的尾部。 | 
|  void | append(Printable painter,
       PageFormat page,
       int numPages)将 numPages个页面追加到此Book的尾部。 | 
|  int | getNumberOfPages()返回此 Book中的页数。 | 
|  PageFormat | getPageFormat(int pageIndex)返回 pageIndex指定的页面的PageFormat。 | 
|  Printable | getPrintable(int pageIndex)返回 Printable实例,该实例负责呈现pageIndex指定的页面。 | 
|  void | setPage(int pageIndex,
        Printable painter,
        PageFormat page)为指定的页码设置 PageFormat和Painter。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public Book()
Book。
| 方法详细信息 | 
|---|
public int getNumberOfPages()
Book 中的页数。
Pageable 中的 getNumberOfPagesBook 包含的页数。
public PageFormat getPageFormat(int pageIndex)
                         throws IndexOutOfBoundsException
pageIndex 指定的页面的 PageFormat。
Pageable 中的 getPageFormatpageIndex - 其 PageFormat 正被请求的页面基于零的索引
PageFormat。
IndexOutOfBoundsException - 如果 Pageable 不包含请求的页面
public Printable getPrintable(int pageIndex)
                       throws IndexOutOfBoundsException
Printable 实例,该实例负责呈现 pageIndex 指定的页面。
Pageable 中的 getPrintablepageIndex - 其 Printable 正被请求的页面基于零的索引
Printable。
IndexOutOfBoundsException - 如果 Pageable 不包含请求的页面
public void setPage(int pageIndex,
                    Printable painter,
                    PageFormat page)
             throws IndexOutOfBoundsException
PageFormat 和 Painter。
pageIndex - 其 painter 和格式要更改的页面基于零的索引painter - 呈现页面的 Printable 实例page - 页面的大小和方向
IndexOutOfBoundsException - 如果指定的页面在此 Book 中不存在
NullPointerException - 如果 painter 或 page 参数为 null
public void append(Printable painter,
                   PageFormat page)
Book 的尾部。
painter - 呈现页面的 Printable 实例page - 页面的大小和方向
NullPointerExceptionpainter 或 page 参数为 null
public void append(Printable painter,
                   PageFormat page,
                   int numPages)
numPages 个页面追加到此 Book 的尾部。每个页面都与 page 有关。
painter - 呈现页面的 Printable 实例page - 页面的大小和方向numPages - 要添加到此 Book 的页面数。
NullPointerExceptionpainter 或 page 参数为 null| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。