Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.print

Interface Pageable

java.lang.Object
|
+--java.awt.print.Pageable


public interface Pageable

This interface represents pages that are to be printed.

Author:

Field Summary

static intUNKNOWN_NUMBER_OF_PAGES

This constant is returned when getNumberOfPages() cannot determine the number of pages available for printing.

Method Summary

intgetNumberOfPages()

This method returns the number of pages this object contains, or UNKNOWN_NUMBER_OF_PAGES if it cannot determine the number of pages to be printed.
java.awt.print.PageFormatgetPageFormat(int pageIndex)

This method returns the PageFormat instance for the specified page.
java.awt.print.PrintablegetPrintable(int pageIndex)

This method returns the Printable instance for the specified page.

Field Details

UNKNOWN_NUMBER_OF_PAGES

public static final int UNKNOWN_NUMBER_OF_PAGES

This constant is returned when getNumberOfPages() cannot determine the number of pages available for printing.


Method Details

getNumberOfPages

public int getNumberOfPages()

This method returns the number of pages this object contains, or UNKNOWN_NUMBER_OF_PAGES if it cannot determine the number of pages to be printed.

Returns:


getPageFormat

public PageFormat getPageFormat(int pageIndex)

This method returns the PageFormat instance for the specified page. Page numbers start at zero. An exception is thrown if the requested page does not exist.

Parameters:

Returns:

Throws:


getPrintable

public Printable getPrintable(int pageIndex)

This method returns the Printable instance for the specified page. Page numbers start at zero. An exception is thrown if the requested page does not exist.

Parameters:

Returns:

Throws: