All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.print.Book
java.lang.Object
|
+----java.awt.print.Book
- public class Book
- extends Object
A Book maintains a list of pages to be printed.
Book.PageAndPainter- The PageAndPainter inner class holds the PageFormat-
Printable pair associated with a given page.
UNKNOWN_NUMBER_OF_PAGES- Pass this constant to the setNumberOfPages method
to indicate that the number of pages in the book
is unknown and thus the book is open ended.
Book()
- Create a new book containing no pages.
append(PageFormat, Printable)
- Append a single page to the end of this
document.
append(PageFormat, Printable, int)
- Append 'numPages' pages to the end of this document.
appendPageAndPainter(Book.PageAndPainter)
- Append a page format and Printable instance pair
enclosed in a PageAndPainter instance to the
end of the book.
getNumberOfPages()
- Return the number of pages in this document.
getPageAndPainter(int)
- Return our inner class that holds both the PageFormat and
the Printable instances for a given page.
getPageFormat(int)
- Return the page format for the 'pageNumber'th
page int he book.
getPagePainter(int)
- Return the Printable instance, the painter, responsible
for drawing the page specified by 'pageNumber'.
setPage(int, PageFormat, Printable)
- Set the page format and the painter for a
given page number.
UNKNOWN_NUMBER_OF_PAGES
public static final int UNKNOWN_NUMBER_OF_PAGES
- Pass this constant to the setNumberOfPages method
to indicate that the number of pages in the book
is unknown and thus the book is open ended.
Book
public Book()
- Create a new book containing no pages.
getNumberOfPages
public int getNumberOfPages()
- Return the number of pages in this document.
setPage
public void setPage(int pageNumber,
PageFormat page,
Printable painter) throws IndexOutOfBoundsException
- Set the page format and the painter for a
given page number. If the page specified is not
already in the book, then an IndexOutOfBoundsException
excpetion is thrown.
getPageFormat
public PageFormat getPageFormat(int pageNumber) throws IndexOutOfBoundsException
- Return the page format for the 'pageNumber'th
page int he book. If there is no such page in
the book, then throw an IndexOutOfBoundsException
exception.
getPagePainter
public Printable getPagePainter(int pageNumber) throws IndexOutOfBoundsException
- Return the Printable instance, the painter, responsible
for drawing the page specified by 'pageNumber'.
getPageAndPainter
protected Book.PageAndPainter getPageAndPainter(int pageNumber) throws IndexOutOfBoundsException
- Return our inner class that holds both the PageFormat and
the Printable instances for a given page.
append
public void append(PageFormat page,
Printable painter)
- Append a single page to the end of this
document.
append
public void append(PageFormat page,
Printable painter,
int numPages)
- Append 'numPages' pages to the end of this document.
Each of the pages is associated with 'page'.
appendPageAndPainter
protected void appendPageAndPainter(Book.PageAndPainter pageAndPainter)
- Append a page format and Printable instance pair
enclosed in a PageAndPainter instance to the
end of the book.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature