public interface Printable
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_NUMBER_OF_PAGES |
Modifier and Type | Method and Description |
---|---|
void |
adjustPrinterProperties(PrinterProperties p)
Adjust the PrinterProperties as necessary.
|
int |
countPages(PageFormat page)
This is called when printing is about to start and it requests a count of the number of pages
that would be necessary to print.
|
String |
getDocumentName() |
PageFormat |
getPreferredFormat()
Return the preferred format for printing, or null if there is no preferred format.
|
boolean |
print(Handle handle,
PointGraphics g,
PageFormat page,
PointRect areaOnPage,
int pageIndex)
This is called for each page as the document is being printed.
|
void |
printingComplete()
This is called after printing is complete and indicates that the Printable object
can release resources associated with it.
|
void |
printingStarting(Printer printer)
This is called before printing starts and before countPages() is called.
|
boolean |
validatePage(PageFormat page,
int pageIndex)
This should return true if the page with the specified index should be printed.
|
static final int UNKNOWN_NUMBER_OF_PAGES
boolean print(Handle handle, PointGraphics g, PageFormat page, PointRect areaOnPage, int pageIndex)
boolean validatePage(PageFormat page, int pageIndex)
void printingStarting(Printer printer)
int countPages(PageFormat page)
void printingComplete()
String getDocumentName()
PageFormat getPreferredFormat()
void adjustPrinterProperties(PrinterProperties p)