home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.4 KB | 50 lines |
- /*
- * @(#)Pageable.java 1.2 98/03/18
- *
- * Copyright 1998 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.awt.print;
-
- /**
- * A Pageable implementation represents a set of
- * pages to be printed. The Pageable object returns
- * the total number of pages in the set as well as
- * the a description, a PageContext, for any given
- * page in the set.
- */
- public interface Pageable {
-
- /**
- * If a Pageable implementation does not know
- * the number of pages in its set, then this
- * constant should be returned from the
- * getNumberOfPages() method.
- */
- int UNKNOWN_NUMBER_OF_PAGES = -1;
-
- /**
- * Returns the number of pages in the set.
- * To enable advanced printing features,
- * it is recommended that Pageable implementations
- * return the true number of pages rather than the
- * UNKNOWN_NUMBER_OF_PAGES constant.
- */
- int getNumberOfPages();
-
- /**
- * Returns a description of the page with
- * the zero based index of 'pageIndex'.
- */
- PageContext getPage(int pageIndex) throws IndexOutOfBoundsException;
- }
-
-