public class JHelpPrintHandler.JHPageable
extends java.lang.Object
implements java.awt.print.Pageable
| Constructor and Description |
|---|
JHelpPrintHandler.JHPageable(javax.swing.JEditorPane editor,
java.net.URL[] urls,
java.awt.print.PageFormat pf) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfPages()
Returns the number of pages in the set.
|
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Returns the
PageFormat of the page specified by
pageIndex. |
java.awt.print.Printable |
getPrintable(int pageIndex)
Returns the
Printable instance responsible for
rendering the page specified by pageIndex. |
public JHelpPrintHandler.JHPageable(javax.swing.JEditorPane editor,
java.net.URL[] urls,
java.awt.print.PageFormat pf)
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws java.lang.IndexOutOfBoundsException
PageFormat of the page specified by
pageIndex.getPageFormat in interface java.awt.print.PageablepageIndex - the zero based index of the page whose
PageFormat is being requestedPageFormat describing the size and
orientation.IndexOutOfBoundsException - the Pageable does not contain the requested
page.java.lang.IndexOutOfBoundsExceptionpublic int getNumberOfPages()
Pageable
implementations return the true number of pages
rather than the
UNKNOWN_NUMBER_OF_PAGES constant.getNumberOfPages in interface java.awt.print.PageablePageable.public java.awt.print.Printable getPrintable(int pageIndex)
throws java.lang.IndexOutOfBoundsException
Printable instance responsible for
rendering the page specified by pageIndex.getPrintable in interface java.awt.print.PageablepageIndex - the zero based index of the page whose
Printable is being requestedPrintable that renders the page.IndexOutOfBoundsException - the Pageable does not contain the requested
page.java.lang.IndexOutOfBoundsException