com.sun.java.help.impl
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.Pageable
pageIndex
- 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.IndexOutOfBoundsException
public int getNumberOfPages()
Pageable
implementations return the true number of pages
rather than the
UNKNOWN_NUMBER_OF_PAGES constant.getNumberOfPages
in interface java.awt.print.Pageable
Pageable
.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.Pageable
pageIndex
- 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