java.awt.print
public interface Pageable
Field Summary | |
---|---|
int | UNKNOWN_NUMBER_OF_PAGES
This constant is returned when getNumberOfPages() cannot
determine the number of pages available for printing. |
Method Summary | |
---|---|
int | getNumberOfPages()
This method returns the number of pages this object contains, or
UNKNOWN_NUMBER_OF_PAGES if it cannot determine the number
of pages to be printed.
|
PageFormat | getPageFormat(int pageIndex)
This method returns the PageFormat instance for the
specified page. |
Printable | getPrintable(int pageIndex)
This method returns the Printable instance for the specified
page. |
getNumberOfPages()
cannot
determine the number of pages available for printing.UNKNOWN_NUMBER_OF_PAGES
if it cannot determine the number
of pages to be printed.
Returns: The number of pages to be printed, or
UNKNOWN_NUMBER_OF_PAGES
if this is unknown.
PageFormat
instance for the
specified page. Page numbers start at zero. An exception is thrown if the
requested page does not exist.
Parameters: pageIndex The index of the page to return the
PageFormat
for.
Returns: The PageFormat
for the requested page.
Throws: IndexOutOfBoundsException If the requested page number does not exist.
Printable
instance for the specified
page. Page numbers start at zero. An exception is thrown if the requested
page does not exist.
Parameters: pageIndex The index of the page to return the
Printable
for.
Returns: The Printable
for the requested page.
Throws: IndexOutOfBoundsException If the requested page number does not exist.