UNKNOWN_NUMBER_OF_PAGES
NO_SUCH_PAGE, PAGE_EXISTS
Modifier | Constructor and Description |
---|---|
protected |
BasicPageable() |
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfPages() |
PageFormat |
getPageFormat(int pageIndex) |
Printable |
getPrintable(int param)
Returns the Printable instance responsible for rendering the page specified by param.
|
int |
print(Graphics g,
PageFormat pageFormat,
int pageIndex)
Prints the page at the specified index into the specified Graphics context in the specified
format.
|
public Printable getPrintable(int param) throws IndexOutOfBoundsException
getPrintable
in interface Pageable
param
- the zero based index of the page whose Printable is being requestedIndexOutOfBoundsException
- if the Pageable does not contain the requested pagePageable.getPrintable(int)
public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException
print
in interface Printable
g
- the context into which the page is drawnpageFormat
- the size and orientation of the page being drawnpageIndex
- the zero based index of the page to be drawnPrintable.PAGE_EXISTS
if the page is rendered successfully or
Printable.NO_SUCH_PAGE
if pageIndex specifies a non-existent
page.PrinterException
- thrown when the print job is terminated.Printable.print(java.awt.Graphics, java.awt.print.PageFormat, int)
public int getNumberOfPages()
getNumberOfPages
in interface Pageable
public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
getPageFormat
in interface Pageable
IndexOutOfBoundsException
Copyright © 2024 levigo holding gmbh. All rights reserved.