home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / print / Pageable.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.4 KB  |  50 lines

  1. /*
  2.  * @(#)Pageable.java    1.2 98/03/18
  3.  *
  4.  * Copyright 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt.print;
  16.  
  17. /**
  18.  * A Pageable implementation represents a set of
  19.  * pages to be printed. The Pageable object returns
  20.  * the total number of pages in the set as well as
  21.  * the a description, a PageContext, for any given
  22.  * page in the set.
  23.  */
  24. public interface Pageable {
  25.  
  26.     /**
  27.      * If a Pageable implementation does not know
  28.      * the number of pages in its set, then this
  29.      * constant should be returned from the
  30.      * getNumberOfPages() method.
  31.      */
  32.     int UNKNOWN_NUMBER_OF_PAGES = -1;
  33.  
  34.     /**
  35.      * Returns the number of pages in the set.
  36.      * To enable advanced printing features,
  37.      * it is recommended that Pageable implementations
  38.      * return the true number of pages rather than the
  39.      * UNKNOWN_NUMBER_OF_PAGES constant.
  40.      */
  41.     int getNumberOfPages();
  42.  
  43.     /**
  44.      * Returns a description of the page with
  45.      * the zero based index of 'pageIndex'.
  46.      */
  47.     PageContext getPage(int pageIndex) throws IndexOutOfBoundsException;
  48. }
  49.  
  50.