Uses of Class
java.awt.print.PageFormat
| Package | Description |
|---|---|
| java.awt.print |
Provides classes and interfaces for a general printing API.
|
-
Uses of PageFormat in java.awt.print
Methods in java.awt.print that return PageFormat Modifier and Type Method Description PageFormatPrinterJob. defaultPage()Creates a newPageFormatinstance and sets it to a default size and orientation.abstract PageFormatPrinterJob. defaultPage(PageFormat page)Clones thePageFormatargument and alters the clone to describe a default page size and orientation.PageFormatBook. getPageFormat(int pageIndex)Returns thePageFormatof the page specified bypageIndex.PageFormatPageable. getPageFormat(int pageIndex)Returns thePageFormatof the page specified bypageIndex.PageFormatPrinterJob. getPageFormat(PrintRequestAttributeSet attributes)Calculates aPageFormatwith values consistent with those supported by the currentPrintServicefor this job (ie the value returned bygetPrintService()) and media, printable area and orientation contained inattributes.abstract PageFormatPrinterJob. pageDialog(PageFormat page)Displays a dialog that allows modification of aPageFormatinstance.PageFormatPrinterJob. pageDialog(PrintRequestAttributeSet attributes)A convenience method which displays a cross-platform page setup dialog.abstract PageFormatPrinterJob. validatePage(PageFormat page)Returns the clone ofpagewith its settings adjusted to be compatible with the current printer of thisPrinterJob.Methods in java.awt.print with parameters of type PageFormat Modifier and Type Method Description voidBook. append(Printable painter, PageFormat page)Appends a single page to the end of thisBook.voidBook. append(Printable painter, PageFormat page, int numPages)AppendsnumPagespages to the end of thisBook.abstract PageFormatPrinterJob. defaultPage(PageFormat page)Clones thePageFormatargument and alters the clone to describe a default page size and orientation.abstract PageFormatPrinterJob. pageDialog(PageFormat page)Displays a dialog that allows modification of aPageFormatinstance.intPrintable. print(Graphics graphics, PageFormat pageFormat, int pageIndex)Prints the page at the specified index into the specifiedGraphicscontext in the specified format.voidBook. setPage(int pageIndex, Printable painter, PageFormat page)Sets thePageFormatand thePainterfor a specified page number.abstract voidPrinterJob. setPrintable(Printable painter, PageFormat format)Callspainterto render the pages in the specifiedformat.abstract PageFormatPrinterJob. validatePage(PageFormat page)Returns the clone ofpagewith its settings adjusted to be compatible with the current printer of thisPrinterJob.