java.awt.print.Pageable
public class JHelpPrintHandler.JHPageable
extends java.lang.Object
implements java.awt.print.Pageable
Constructor | Description |
---|---|
JHPageable(javax.swing.JEditorPane editor,
java.net.URL[] urls,
java.awt.print.PageFormat pf) |
Modifier and Type | Method | 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 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.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.java.lang.IndexOutOfBoundsException