home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / PrintJob.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  79 lines

  1. /*
  2.  * @(#)PrintJob.java    1.5 96/11/23
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22.  
  23. package java.awt;
  24.  
  25. /** 
  26.  * An abstract class which initiates and executes a print job.
  27.  * It provides access to a print graphics object which renders
  28.  * to an appropriate print device.
  29.  *
  30.  * @see Toolkit#getPrintJob
  31.  *
  32.  * @version     1.5 11/23/96
  33.  * @author     Amy Fowler
  34.  */
  35. public abstract class PrintJob {
  36.  
  37.     /**
  38.      * Gets a Graphics object that will draw to the next page.
  39.      * The page is sent to the printer when the graphics 
  40.      * object is disposed.  This graphics object will also implement
  41.      * the PrintGraphics interface.
  42.      * @see PrintGraphics
  43.      */
  44.     public abstract Graphics getGraphics();
  45.  
  46.     /**
  47.      * Returns the dimensions of the page in pixels.
  48.      * The resolution of the page is chosen so that it
  49.      * is similar to the screen resolution.
  50.      */
  51.     public abstract Dimension getPageDimension();
  52.  
  53.     /**
  54.      * Returns the resolution of the page in pixels per inch.
  55.      * Note that this doesn't have to correspond to the physical
  56.      * resolution of the printer.
  57.      */
  58.     public abstract int getPageResolution();
  59.  
  60.     /**
  61.      * Returns true if the last page will be printed first.
  62.      */
  63.     public abstract boolean lastPageFirst();
  64.  
  65.     /**
  66.      * Ends the print job and does any necessary cleanup.
  67.      */
  68.     public abstract void end();
  69.  
  70.     /**
  71.      * Ends this print job once it is no longer referenced.
  72.      * @see #end
  73.      */
  74.     public void finalize() {
  75.     end();
  76.     }
  77.  
  78. }
  79.