Java AWT

Previous Chapter 19
java.awt Reference
Next
 

PrintJob (New)

Name

PrintJob (New)

[Graphic: Figure from the text]

Description

PrintJob encapsulates printing information. When you call Toolkit.getPrintJob(), this is the object that is returned. From the PrintJob, you can access a Graphics object, which can be used for drawing to the printer.

Class Definition

public abstract class jav.awt.PrintJob
    extends java.lang.Object {
  // Instance Methods
  public abstract void end();
  public void finalize();
  public abstract Graphics getGraphics();
  public abstract Dimension getPageDimension();
  public abstract int getPageResolution();
  public abstract boolean lastPageFirst();
}

Instance Methods

end

public abstract void end()

Description

Ends printing and cleans up.

finalize

public void finalize()

Overrides

Object.finalize()

Description

Cleans up when this object is garbage collected.

getGraphics

public abstract Graphics getGraphics()

Returns

A Graphics object representing the next page. The object returned will also implement the PrintGraphics interface.

Description

Returns a Graphics object for printing.

getPageDimension

public abstract Dimension getPageDimension()

Returns

The page dimensions in pixels.

getPageResolution

public abstract int getPageResolution

Returns

The page resolution, in pixels per inch.

lastPageFirst

public abstract boolean lastPageFirst()

Returns

true if pages are printed in reverse order; false otherwise.

See Also

Dimension, Graphics, PrintGraphics, Toolkit


Previous Home Next
PrintGraphics (New) Book Index Rectangle

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java
This HTML Help has been published using the chm2web software.