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 / PageContext.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.3 KB  |  51 lines

  1. /*
  2.  * @(#)PageContext.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 PageContext implementation provides information
  19.  * about a page that is part of a PrinterJob. The
  20.  * PageContext provides the painter, a Printable
  21.  * implementation, as well as the format of a page.
  22.  */
  23.  
  24. public interface PageContext {
  25.  
  26.     /**
  27.      * Return the object that paints the image on
  28.      * the page.
  29.      */
  30.      Printable getPagePainter();
  31.  
  32.     /**
  33.      * Return the format of the page being drawn.
  34.      */
  35.     PageFormat getPageFormat();
  36.  
  37.     /**
  38.      * Return the name of the given page. This name might
  39.      * simply be the page's index plus 1 returned as a
  40.      * String or it might be something like "iii" or
  41.      * "Table of Contents". 
  42.      */
  43.     String getPageName();
  44.  
  45.     /**
  46.      * Return the index of the page being drawn.
  47.      */
  48.     int getPageIndex();
  49.        
  50. }
  51.