|
JavaTM 2 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 - 頁面的大小和方向
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
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。