APIdia Launch Partner
Top Description Fields Methods
sun.swing.text

public Interface CountingPrintable

extends Printable
Known Direct Implementers
sun.swing.text.TextComponentPrintable, sun.swing.text.CompoundPrintable
Imports
java.awt.print.*

Printable which counts the number of pages.
Author
Igor Kushnirskiy
Since
1.6

Field Summary

Inherited from java.awt.print.Printable:
NO_SUCH_PAGEPAGE_EXISTS

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of pages.
getNumberOfPages
()

Returns the number of pages in this printable.

Inherited from java.awt.print.Printable:
print

Method Detail

getNumberOfPagesback to summary
public int getNumberOfPages()

Returns the number of pages in this printable.

This number is defined only after print returns NO_SUCH_PAGE.

Returns:int

the number of pages.