| |
|
| java.lang.Object java.awt.print.Book
Book | public class Book implements Pageable(Code) | | The Book class provides a representation of a document in
which pages may have different page formats and page painters. This
class uses the
Pageable interface to interact with a
PrinterJob .
See Also: Pageable See Also: PrinterJob See Also: |
Constructor Summary | |
public | Book() Creates a new, empty Book . |
Book | public Book()(Code) | | Creates a new, empty Book .
|
append | public void append(Printable painter, PageFormat page)(Code) | | Appends a single page to the end of this Book .
Parameters: painter - the Printable instance thatrenders the page Parameters: page - the size and orientation of the page NullPointerException If the painter or page argument is null |
append | public void append(Printable painter, PageFormat page, int numPages)(Code) | | Appends numPages pages to the end of this
Book . Each of the pages is associated with
page .
Parameters: painter - the Printable instance that rendersthe page Parameters: page - the size and orientation of the page Parameters: numPages - the number of pages to be added to thethis Book . NullPointerException If the painter or page argument is null |
getNumberOfPages | public int getNumberOfPages()(Code) | | Returns the number of pages in this Book .
the number of pages this Book contains. |
getPageFormat | public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException(Code) | | Returns the
PageFormat of the page specified by
pageIndex .
Parameters: pageIndex - the zero based index of the page whosePageFormat is being requested the PageFormat describing the size andorientation of the page. throws: IndexOutOfBoundsException - if the Pageable does not contain the requested page |
getPrintable | public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException(Code) | | Returns the
Printable instance responsible for rendering
the page specified by pageIndex .
Parameters: pageIndex - the zero based index of the page whosePrintable is being requested the Printable that renders the page. throws: IndexOutOfBoundsException - if the Pageable does not contain the requested page |
setPage | public void setPage(int pageIndex, Printable painter, PageFormat page) throws IndexOutOfBoundsException(Code) | | Sets the PageFormat and the Painter for a
specified page number.
Parameters: pageIndex - the zero based index of the page whosepainter and format is altered Parameters: painter - the Printable instance thatrenders the page Parameters: page - the size and orientation of the page throws: IndexOutOfBoundsException - if the specifiedpage is not already in this Book throws: NullPointerException - if the painter orpage argument is null |
|
|
|